In order to get more accurate stack traces, set
build_type="Debug"
in config.sh
, compile (if not compiled already) and run FreeCAD under gdb
:
-
Add the following into
.bashrc
[1]:alias bt='echo 0 | gdb -batch-silent -ex "run" -ex "set logging overwrite on" -ex "set logging file gdb.bt" -ex "set logging on" -ex "set pagination off" -ex "handle SIG33 pass nostop noprint" -ex "echo backtrace:\n" -ex "backtrace full" -ex "echo \n\nregisters:\n" -ex "info registers" -ex "echo \n\ncurrent instructions:\n" -ex "x/16i \$pc" -ex "echo \n\nthreads backtrace:\n" -ex "thread apply all backtrace" -ex "set logging off" -ex "quit" --args'
-
Run FreeCAD:
bt ~/fc-build/Debug/bin/FreeCAD
-
After crash, debug output will be at
~/gdb.bt
-
You can use
create-gist.sh
for uploading the dump files to Gist:create-gist.sh ~/gdb.bt