summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorportix <none@none>2012-11-03 13:52:35 +0100
committerportix <none@none>2012-11-03 13:52:35 +0100
commit99bd0954de2c7ba1d0598ac62a6d537a84e28461 (patch)
tree24b5f48af12dfeadbbb225a625e798313bcfde9c /tools
parent9b6a0a65baaec896a879a98e7dcbdaa71484cbb3 (diff)
downloaddwb-99bd0954de2c7ba1d0598ac62a6d537a84e28461.zip
Adding backtrace.sh
Diffstat (limited to 'tools')
-rwxr-xr-xtools/backtrace.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/backtrace.sh b/tools/backtrace.sh
new file mode 100755
index 00000000..8b3ab910
--- /dev/null
+++ b/tools/backtrace.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+# Debugging script for dwb, needs mercurial and gdb
+
+BUILDDIR="/tmp/DWB_DEBUG_$UID"
+LOGFILE="/tmp/dwb_gdb_$UID.log"
+
+
+if [ ! -d ${BUILDDIR} ]; then
+ mkdir ${BUILDDIR}
+fi
+
+cd ${BUILDDIR}
+echo $PWD
+if [ ! -d ${BUILDDIR}/dwb ]; then
+ hg clone https://bitbucket.org/portix/dwb
+ cd ${BUILDDIR}/dwb
+else
+ cd ${BUILDDIR}/dwb
+ hg pull
+ hg up
+fi
+
+cd ${BUILDDIR}/dwb/src
+make debug
+gdb -batch -ex "set logging on ${LOGFILE}" -ex "run" -ex "bt" -ex "quit" dwb_d