From: Kern Sibbald Date: Wed, 21 Apr 2010 07:31:16 +0000 (+0200) Subject: Allow traceback with gdb on Solaris X-Git-Tag: Release-5.2.1~1437 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=860c50e3a2750a7ba16a1f1184fb25b2b14852b6;p=bacula%2Fbacula Allow traceback with gdb on Solaris --- diff --git a/bacula/scripts/btraceback.in b/bacula/scripts/btraceback.in index 959ce1544e..a9ab1a58e5 100755 --- a/bacula/scripts/btraceback.in +++ b/bacula/scripts/btraceback.in @@ -11,12 +11,15 @@ # PNAME=`basename $1` WD="$3" +GDB=`which gdb` if test `uname -s` = SunOS ; then gcore -o ${WD}/${PNAME} $2 if [ -x /usr/bin/mdb ]; then mdb -u -p $2 <@scriptdir@/btraceback.mdb >${WD}/bacula.$2.traceback 2>&1 - else + elif [ -x /usr/bin/dbx ]; then dbx $1 $2 <@scriptdir@/btraceback.dbx >${WD}/bacula.$2.traceback 2>&1 + elif [ "x${GDB}" != "x" ]; then + gdb -quiet -batch -x @scriptdir@/btraceback.gdb $1 $2 >${WD}/bacula.$2.traceback 2>&1 fi PNAME="${PNAME} on `hostname`" cat ${WD}/bacula.$2.traceback \