How to get a backtrace
mdoschWhen you’re running profanity master it may occur that profanity crashes with SIGSEGV or SIGABRT when new features are added. If this happens it is helpful to provide a backtrace for the developers to find and fix the bug.
I will explain one possibility how to get a backtrace of profanity (or any other TUI application)1:
Preparation
The following requirements must be installed:
- gdb
- gdbserver
- debug symbols (depending on your distribution they might already be included)
- e.g. profanity-dbgsym (for debian)
- e.g. libstrophe0-dbgsym (for debian)
- e.g. libexpat1-dbgsym (for debian)
Run profanity
- Open terminal #1
- Run
gdbserver localhost:1234 /usr/bin/profanity
- Run
- Open terminal #2
- Run
gdb /usr/bin/profanity - Enter
target remote localhost:1234 - Enter
c
- Run
- Profanity opens in terminal #1
- Reproduce crash
- A gdb command line opens in terminal #2
- Enter
btorbt full2
- Enter
- Create an issue in the bugtracker and include the output of the previous step (see this example)
-
This explanation was first published on my personal blog. ↩
-
bt fullgives a much more detailled output but in most casesbtis enough for the dev to know what’s going on. ↩