-
Notifications
You must be signed in to change notification settings - Fork 785
How to use GDB to gather debug information on a program
Michael Webster edited this page Mar 2, 2015
·
5 revisions
sudo apt-get install gnome-dbg nemo-dbg cinnamon-dbg muffin-dbg
sudo killall nemo
For a binary program (nemo for instance):
gdb nemo
For a python program:
gdb python
For a binary:
run
For a python program:
run *path to .py or python-shebanged file*
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
Run this instead:
G_DEBUG=fatal_warnings gdb nemo
Execution will halt at every glib warning - you can get a backtrace (bt
), or keep going (c
).