diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-07-21 12:35:00 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:29:53 -0500 |
commit | 563794083834b8e63c7f00ab2986a482adc5fd0c (patch) | |
tree | 37867bd3ad04f48c2818e06286fb56c66660c646 | |
parent | 87e2396be99a1560d3f083e77e5fc6c583d3b9c1 (diff) | |
download | samba-563794083834b8e63c7f00ab2986a482adc5fd0c.tar.gz samba-563794083834b8e63c7f00ab2986a482adc5fd0c.tar.bz2 samba-563794083834b8e63c7f00ab2986a482adc5fd0c.zip |
r8680: try harder to find the binary for gdb in the backtrace
(This used to be commit e84871dd3232de73104bee81dd877cc329cd1970)
-rwxr-xr-x | source4/script/gdb_backtrace | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/script/gdb_backtrace b/source4/script/gdb_backtrace index 0ba8c0eaad..72d1f75be9 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 |