From 312a7223d3c18e058aa4fe38c411ee7a6eca719b Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 21 Sep 2012 15:35:54 +0100 Subject: [PATCH 02/21] exec-with-log.sh: add gdb wrapper Based on a patch from Jonny Lamb; changed to use ${abs_top_srcdir} to work out-of-tree, backtrace all threads, and put the gdb script in /tools. Signed-off-by: Simon McVittie Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55391 --- tests/twisted/tools/exec-with-log.sh.in | 2 ++ tools/Makefile.am | 1 + tools/run_and_bt.gdb | 7 +++++++ 3 files changed, 10 insertions(+) create mode 100644 tools/run_and_bt.gdb diff --git a/tests/twisted/tools/exec-with-log.sh.in b/tests/twisted/tools/exec-with-log.sh.in index 9ff5a89..74bc56d 100644 --- a/tests/twisted/tools/exec-with-log.sh.in +++ b/tests/twisted/tools/exec-with-log.sh.in @@ -50,6 +50,8 @@ elif test -n "$MISSIONCONTROL_TEST_REFDBG"; then if test -z "$MISSIONCONTROL_WRAPPER" ; then MISSIONCONTROL_WRAPPER="refdbg" fi +elif test -n "$MISSIONCONTROL_TEST_BACKTRACE"; then + MISSIONCONTROL_WRAPPER="gdb -x @abs_top_srcdir@/tools/run_and_bt.gdb" fi # The bus-daemon that is activating us doesn't know it's also the system bus diff --git a/tools/Makefile.am b/tools/Makefile.am index 7426080..befd266 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -15,6 +15,7 @@ EXTRA_DIST = \ lcov.am \ libtpcodegen.py \ libglibcodegen.py \ + run_and_bt.gdb \ spec-to-introspect.xsl \ telepathy.am 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.7.10.4