Backtrace
|
Size: 1130
Comment: Description
|
Size: 1207
Comment: Remind people to install gdb.
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 9: | Line 9: |
| 1. Make sure the GNU Debugger is installed. {{{ apt-get install gdb }}} |
A backtrace shows a listing of which program functions are still active. Since functions are nested when they are called, the program must record where it left one function, to jump into an inner one. It does this on the stack, which we dump for the backtrace,
By getting a backtrace at the point of a bug, a developer may be able to isolate where that bug is, because it will narrow down to the function, or even the line, that caused the erroneous behaviour.
Generation
Please ensure you have packages with debug symbols installed. You can do this by following the instructions at DebuggingProgramCrash.
Make sure the GNU Debugger is installed.
apt-get install gdb
Start the program under control of gdb:
gdb <program> (gdb) handle SIG33 pass nostop noprint (gdb) run <arguments, if any>
- The program will start. Perform any actions necessary to reproduce the crash
Retrieve a backtrace of the crash:
(gdb) thread apply all bt
If the output gets very long, you might want to use:
(gdb) set logging file backtrace.txt (gdb) set logging on
beforehand.- Include the complete output from GDB in your bug report.
Backtrace (last edited 2022-12-20 22:15:16 by sergiodj)