Knowledge Base

Preserving for the future: Shell scripts, AoC, and more

Gdb backtrace notes

tl; dr

export DEBUGINFOD_URLS="https://debuginfod.debian.net"
gdb -batch -n -ex 'set debuginfod enabled on' -ex 'set pagination off' -ex run -ex bt -ex 'bt full' -ex 'thread apply all bt full' --args pidgin --debug 2>&1 | tee -a ~/debug8.log

Longer explanation

Debuginfod is a newer mechanism where a debugger can be told where to download symbols, so you don't necessarily have to have the <package>-dbgsym installed, in a Devuan instance. But for any situation where that is not suitable, you can use a -dbgsym package.

So when troubleshooting an application crash, the last few instructions to gdb dump all the stack info (backtrace, or bt). And then you can distribute a scrubbed backtrace to the developers.

References

  1. HowToGetABacktrace - Debian Wiki
  2. Debugging :: Pidgin, the universal chat client
  3. Debuginfod Settings (Debugging with GDB)

Comments