How do I get useful debugging information from a crash?

Created by Steven Sheehy on on 2010-04-18
Keywords:
crash backtrace stacktrace gdb debug
Last updated by:
Steven Sheehy on on 2010-04-18

In order for the LinuxDC++ team to investigate crashes we will need three things:

- Steps to reproduce
- Terminal output
- Stacktrace output from gdb

To get the latter two, first make sure you are running a binary with debug symbols. Without debug symbols, the output won't show where in the code the program is crashing. To get a binary compiled with debug symbols you can either compile it yourself (which is outside the scope of this article) or, if you're using Ubuntu, you can use our PPA (https://launchpad.net/~linuxdcpp-team/+archive/ppa).

Once you have a binary with debug symbols, type the following commands from a terminal:

1) ulimit -c unlimited
2) linuxdcpp 2>&1 | tee terminal_output.txt

Make the program crash, then:

3) gdb linuxdcpp core*
4) set logging on gdb_output.txt
5) thread apply all bt full
6) quit

Attach the terminal_output.txt and the gdb_output.txt to the bug report.