summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2012-09-21 15:35:54 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-10-03 15:27:41 +0200
commita433ba2a46c9fdcd73e365c88639a6e501762893 (patch)
tree838dd5dc519c21b85b2ced51d5bed07a85778288
parent91006767d5ce8f95b43c7ff85fc6e5ec90d8895c (diff)
downloadtelepathy-mission-control-a433ba2a46c9fdcd73e365c88639a6e501762893.tar.gz
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 <simon.mcvittie@collabora.co.uk>
-rw-r--r--tests/twisted/tools/exec-with-log.sh.in2
-rw-r--r--tools/Makefile.am1
-rw-r--r--tools/run_and_bt.gdb7
3 files changed, 10 insertions, 0 deletions
diff --git a/tests/twisted/tools/exec-with-log.sh.in b/tests/twisted/tools/exec-with-log.sh.in
index 9ff5a899..74bc56dd 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 7426080f..befd2666 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 00000000..201353fe
--- /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