telepathy-mission-control: exec-with-log.sh: add gdb wrapper

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Wed Oct 3 06:27:50 PDT 2012


Module: telepathy-mission-control
Branch: master
Commit: a433ba2a46c9fdcd73e365c88639a6e501762893
URL:    http://cgit.freedesktop.org/telepathy/telepathy-mission-control/commit/?id=a433ba2a46c9fdcd73e365c88639a6e501762893

Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date:   Fri Sep 21 15:35:54 2012 +0100

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 at collabora.co.uk>

---

 tests/twisted/tools/exec-with-log.sh.in |    2 ++
 tools/Makefile.am                       |    1 +
 tools/run_and_bt.gdb                    |    7 +++++++
 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 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



More information about the telepathy-commits mailing list