Commit 20b896ce authored by Kirill Smelkov's avatar Kirill Smelkov

Handy alias to print python-level backtrace

Works even if there is no debuginfo for cpython.
parent b85f9271
# print python-level backtrace to program stdout from-under gdb
define xpybt
set $_gstate = PyGILState_Ensure()
set $_unused_int = PyRun_SimpleString("import traceback; traceback.print_stack()")
set $_unused_void = PyGILState_Release($_gstate)
end
# vim: ft=gdb
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment