Skip to content

How to use GDB to gather debug information on a program

mtwebster edited this page Dec 19, 2014 · 5 revisions
Install debug symbols:

sudo apt-get install gnome-dbg nemo-dbg cinnamon-dbg muffin-dbg

Kill any existing instances of the program if necessary - for nemo you might simply do:

sudo killall nemo

Start up the debugger.

For a binary program (nemo for instance):

gdb nemo

For a python program:

gdb python

Debugging the program:

For a binary:

run

For a python program:

run *path to .py or python-shebanged file*

****************** Make the program crash **********************
Now get a trace:

thread apply all bt

Be prepared to supply the entire contents of the backtrace - there may (and probably will) be multiple pages, that you'll have to spacebar down to get to the end up - be sure to save all of this.

One you're done you can just type:

quit