Re: Advanced c++ debugging techniques on Unix



Hi,

I imagine there likely to exist some "must read" too for the second.

So, here I am polling for those of you that have been impressed by
books, tools or libs on advanced c++ debugging techniques on Unix.

It looks like debugging is some kind of "black art" ;-) There is not much on that topic in general.

For me it works best to first resolve all compiler errors and warnings (gcc/g++ is very informative ;-) and then to test the program extensively. Segmentation faults are relatively easy to debug (using gdb or valgrind), logical faults require lots of printf/cout.

But mostly debugging depends on program design - I write my programs so that errors will lead to an immediate chrash (segmentation fault) and get my program so safe that this doesn't occur ;-) Also using several small modules instead of few large ones helps if you can identify by the nature of the error which module is concerned...

Doing step-by-step debugging seems not very efficient for me - a professor at university said about it "you debug the CPU, not your program."

Those books that reveals "what, how and why using this tool/lib (open
source or commercial) when faced with this kind of problems". Or books
that teach "You did it wrong, man! Here is how to do this."

Go ahead, set up a wiki invite some people in this group and you'll be able to produce some "Debugging C and C++ Howto"...

Ciao...
.



Relevant Pages

  • Programs, books, and techniques for debugging C or C++ programs.
    ... "Programs, books, and techniques for debugging C or C++ programs." ... found that I currently have 57 assertions in place. ...
    (alt.comp.lang.learn.c-cpp)
  • Debugging and Deployment [Books/References]
    ... I would like to ask whethere there is any good books that talk more about ... but topics related to the Debugging and Deployment are ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Multi thread appli
    ... The below article talks how to debug multithread application from developer ... "Debugging Windows Programs: Strategies, Tools, and Techniques for Visual ... Both of these 2 books have a dedicated chapter regarding multithread ...
    (microsoft.public.vsnet.debugging)
  • Re: Debugging; jscript error
    ... I printed your instructions and went to my computer, ... > books I have don't say anything about debugging. ... Rita ...
    (microsoft.public.windowsxp.newusers)
  • Are there any good books on testing/debugging an application?
    ... There are scores of good books on how to write C# applications, ... recall any that focus strictly on testing and debugging. ...
    (microsoft.public.dotnet.languages.csharp)