diff options
-rwxr-xr-x | tools/backtrace.sh | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/tools/backtrace.sh b/tools/backtrace.sh index d5e32d1e..0c77dd3f 100755 --- a/tools/backtrace.sh +++ b/tools/backtrace.sh @@ -1,28 +1,22 @@ #!/bin/bash -# Debugging script for dwb, needs mercurial and gdb +# Debugging script for dwb, needs gdb BUILDDIR="/tmp/DWB_DEBUG_$UID" LOGFILE="$BUILDDIR/gdb.log" +DWBDIR="${BUILDDIR}/dwb" -if [ ! -d ${BUILDDIR} ]; then - mkdir ${BUILDDIR} +if [ ! -d "${DWBDIR}" ]; then + mkdir -p "${DWBDIR}" 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 +wget https://bitbucket.org/portix/dwb/get/master.tar.gz +tar xvf master.tar.gz -C "${DWBDIR}" --strip-components=1 -cd ${BUILDDIR}/dwb/util +cd "${DWBDIR}/src/util" make -cd ${BUILDDIR}/dwb/src +cd "${DWBDIR}/src" make debug gdb -batch -ex "set logging on ${LOGFILE}" -ex "run" -ex "bt" -ex "quit" dwb_d |