From: Andrew Tridgell Date: Thu, 21 Jul 2005 12:35:00 +0000 (+0000) Subject: r8680: try harder to find the binary for gdb in the backtrace X-Git-Url: http://git.samba.org/samba.git/?p=jra%2Fsamba%2F.git;a=commitdiff_plain;h=563794083834b8e63c7f00ab2986a482adc5fd0c r8680: try harder to find the binary for gdb in the backtrace (This used to be commit e84871dd3232de73104bee81dd877cc329cd1970) --- diff --git a/source4/script/gdb_backtrace b/source4/script/gdb_backtrace index 0ba8c0eaad1..72d1f75be99 100755 --- a/source4/script/gdb_backtrace +++ b/source4/script/gdb_backtrace @@ -13,5 +13,16 @@ bt full quit EOF +if [ ! -f $PROG ]; then + PROG=`which $PROG` +fi +if [ ! -f $PROG ]; then + PROG=/proc/$PID/exe +fi +if [ ! -f $PROG ]; then + echo "Unable to find binary" + exit 1 +fi + gdb -batch -x $TMPFILE $PROG $PID < /dev/null /bin/rm -f $TMPFILE