Sie sind auf Seite 1von 1

alias bt='echo 0 | gdb -batch-silent -ex "run" -ex "set logging overwrite on" -e

x "set logging file thread.txt" -ex "set logging on" -ex "set pagination off" -e
x "handle SIG33 pass nostop noprint" -ex "echo backtrace:\n" -ex "backtrace full
" -ex "echo \n\nregisters:\n" -ex "info registers" -ex "echo \n\ncurrent instruc
tions:\n" -ex "x/16i \$pc" -ex "echo \n\nthreads backtrace:\n" -ex "thread apply
all backtrace" -ex "set logging off" -ex "quit" --args'
bt $core.***
----------------------------
Core Files
You are also able to retrace a core file if you have one produced. (I believe th
ese are disabled by default)
Load the core file into the debugger
gdb -c <corefile> <exename> 2>&1 | tee gdb-<program>.txt
Retrieve a backtrace of the crash:
(gdb) backtrace full
(gdb) info registers
(gdb) x/16i $pc
(gdb) thread apply all backtrace
(gdb) quit
Attach the complete output from GDB, contained in gdb-<program>.txt, in your bug
report. You will find the file in your home directory /home/<username>/.

Das könnte Ihnen auch gefallen