4 ms·
A debugger's a great way to go through a source base of under/badly/not documented code. Ironically enough, GDB's probably the only way to get a good handle of
by lallysingh 18y ago
A debugger's a great way to go through a source base of under/badly/not documented code. Ironically enough, GDB's probably the only way to get a good handle of what GCC does internally.
I love gdb's ability to call an arbitrary routine of your code while in a breakpoint. A good print/validation routine for your own data structures is wonderful there.
But yeah, it can turn into a parasitic, addictive time sucker if you don't stay disciplined about it. If all you're wanting is a stack trace here or there, and it doesn't take too long to relink the app, it's usually faster to put an
if (condition) { printf(interesting state); }
in the code than conditional breakpoints.