If a program happens to have 'PyList_New' defined but is not a python
script, gdb will print
> Undefined command: "py-bt". Try "help".
and probably stop. This happens after the C backtraces have been
printed, so nothing is lost.
The traceback is printed twice -- once in conventional Python style
for clarity, and once with extra "full" information.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
bt full
thread apply all bt full
info locals
+if PyList_New
+ echo \\n### Python traceback\\n\\n
+ py-bt
+ echo \\n### Python locals\\n\\n
+ py-locals
+ echo \\n### Python full traceback\\n\\n
+ py-bt-full
+end
quit
EOF
${DB_BIN} -batch -x "${BATCHFILE_MAIN}" --pid "${PID}" </dev/null