What are the 'must know' GDB commands?

Posted by Chris Smith on Programmers See other posts from Programmers or by Chris Smith
Published on 2010-12-31T04:00:53Z Indexed on 2010/12/31 4:58 UTC
Read the original article Hit count: 330

Filed under:
|

I'm starting to get the hang of GDB, but everything still feels much slower than when debugging in Eclipse or Visual Studio.

Are there any GDB commands you find particularly useful/productive? My life became dramatically better when I discovered:

list - Display source code near the current instruction

But that is still pretty basic. (And unnecessary when running GDB from Emacs.) Is there any way to do things like setup a watch window? (Print and update the result of an expression every time execution stops.)

© Programmers or respective owner

Related posts about debugging

Related posts about gdb