Is there any tutorial about using debuggers, when doing C programming on Linux (console mode)?
Is there any tutorial about using debuggers, when doing C programming on Linux (console
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do you have a particular debugger in mind, or are you just looking for a general introduction to debuggers?
For Linux debugging, Checkers is almost certainly right, you will be using GDB, and that is a good tutorial (but dont let it stop you from googling 😉 http://www.google.com.sg/search?hl=en&source=hp&q=gdb+tutorial
I don’t know how you are developing your code, but I would highly recommend using the Eclipse IDE *use CDT plugin, since you are developing C) – http://www.eclipse.org/cdt/
Eclipse is an excellent free IDE and is practically a de facto standard among professionals. You can edit your code and also step through through it in the debugger Eclipse, but Eclipse also supports many, many other plugins which will be of great use to you:
DoxyGen for documenting your code, Splint for static code analysis, catching problems which the compiler does not, CppUnit for automated testing, BugZilla (etc) for problem reporting, CVS, Subversion, etc, for version control … you get the picture.
Since we are talking of debuggers, I admit that I can’t yet get Eclipse to support DDD, and if you don’t know why you want DDD, a picture is worth a thousand words .. http://www.gnu.org/software/ddd/all.png
See that lovely picture in the top pane? If you use pointers and linked structures, then DDD is indispensable, IMO.
Don’t forget that arguably the best debugging is not done in the debugger, but in code review, static code analysis (http://www.splint.org/ http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page), etc