As I always forget how to get a backtrace of profanity (or any other TUI application) I write down an example.
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 profanity when using debian)
- e.g. libstrophe0-dbgsym (for profanity when using debian)
- e.g. libexpat1-dbgsym (for profanity when using debian)
Run the application
- 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
- The application (profanity in this example) opens in terminal #1
- Reproduce crash
- A gdb command line opens in terminal #2
- Enter
bt
orbt full
1
- Enter
- Copy the output and go molesting the developers. 😁
-
bt full
gives a much more detailled output but in most casesbt
is enough for the dev to know what’s going on. ↩︎