From cb10ecd346042e32f4661e1ed8c0db2f79067d1a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 23 Sep 2013 17:47:55 +0100 Subject: [PATCH 19/19] exec-with-log.sh: add HAZE_TEST_BACKTRACE hook --- tests/twisted/tools/exec-with-log.sh | 2 ++ tools/run_and_bt.gdb | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 tools/run_and_bt.gdb diff --git a/tests/twisted/tools/exec-with-log.sh b/tests/twisted/tools/exec-with-log.sh index 54abf29..e6e9379 100755 --- a/tests/twisted/tools/exec-with-log.sh +++ b/tests/twisted/tools/exec-with-log.sh @@ -38,6 +38,8 @@ elif test -n "$HAZE_TEST_REFDBG"; then if test -z "$HAZE_WRAPPER" ; then HAZE_WRAPPER="refdbg" fi +elif test -n "$HAZE_TEST_BACKTRACE"; then + HAZE_WRAPPER="gdb -x ${abs_top_srcdir}/tools/run_and_bt.gdb" fi # not suitable for haze: diff --git a/tools/run_and_bt.gdb b/tools/run_and_bt.gdb new file mode 100644 index 0000000..201353f --- /dev/null +++ b/tools/run_and_bt.gdb @@ -0,0 +1,7 @@ +run +echo ---- [bt full] -------------------------------------------\n +bt full +echo -----[thread apply all bt full] --------------------------\n +thread apply all bt full +echo ----------------------------------------------------------\n +quit -- 1.8.4.rc3