LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2021, 06:54 PM   #1
petrus.autem
LQ Newbie
 
Registered: Nov 2009
Posts: 2

Rep: Reputation: 0
Question C programming debug


Is there any program in Linux to see,step by step, the behaviour of the variables in executing a C file?
 
Old 04-02-2021, 01:20 AM   #2
Mechanikx
Member
 
Registered: Jul 2018
Distribution: Slackware
Posts: 351

Rep: Reputation: 258Reputation: 258Reputation: 258
Yes, you could run your program with gdb and set a watchpoint.

Code:
watch <variable>
More info can be found here https://sourceware.org/gdb/current/o...et-Watchpoints
 
2 members found this post helpful.
Old 04-02-2021, 04:42 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,836

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
yes, gdb and you can also try ddd (which is a graphical frontend to gdb).
 
1 members found this post helpful.
Old 04-10-2021, 07:34 AM   #4
petrus.autem
LQ Newbie
 
Registered: Nov 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thank you both. It was very usefull.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Not able to debug a library compiled with debug information gregorian Programming 6 10-29-2011 09:53 AM
libc6-debug or glibc-debug fibreoptique Linux - Newbie 2 01-20-2011 07:52 AM
how debug kernel with ddd? how debug the kernel with ddd? mjalalynia Linux - Kernel 2 08-25-2008 06:50 AM
How to debug without having debug section in an executable ? unclesam Linux - Newbie 0 02-02-2006 06:23 AM
[debug]what does the following debug information mean icoming Programming 21 06-08-2004 02:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration