>>7
IMHO a debugger is a tool of last resort. Once you have exhausted every other avenue of diagnosis, and have given very careful thought to just rewriting the offending code, *then* you may need a debugger.
every other avenue of diagnosis void main() {
int i, j, *k;
printf( "ENTERING MAIN LOOP\n" );
printf( "SETTING VARIABLES\n" );
i = 1;
printf( "i=%d\n", i );
j = 2;
printf( "j=%d\n", j );
k = 0;
printf( "k=%d\n", k );
printf( "PERFORMING LOGIC\n" );
if ( i == j ) {
printf( "THE VALUE OF I IS EQUAL TO J\n" );
printf( "SETTING I TO THE VALUE AT K\n" );
i = *k;
}
else {
printf( "I = %d AND J = %d\n", i, j );
}
printf( "TIDYING UP THE STACK\n" );
}
Because using gdb to find the bug is much too difficult, and involves setting EXPERT CFLAGS.
>>11,13
Since I started using Test Driven Development in 1999, I have not found a serious use for a debugger. The kinds of bugs I have to troubleshoot are easily isolated by my unit tests, and can be quickly found through inspection and a few judiciously placed print statements.
>>29
The only thing I really use GDB for is backtracing a segfault/etc. so I can find out where to look, and see the values of the variables at the time of the crash. Then it's back to manual traces.
DDD was very useful. Sadly, it died on 2008-05-06.
(2008/05/06) New plans for DDD. The ne problemw maintainer has communicated to the official DDD distribution list about the intention of change the GUI to a Qt based interface. At the end, it seems that what is going to happens is that DDD will have two branches, one with a GUI based in Qt and other based in Gtkmm, with a common core that will be independent of the GUI. So, it will be possible putting any other GUI based in any other library. As you know Qt is GPL v3 licensed.
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy