cb077a3
Index: gdb-6.3/gdb/gstack.sh
bc67a32
===================================================================
bc67a32
--- gdb-6.3.orig/gdb/gstack.sh	2006-02-14 17:21:05.000000000 -0200
bc67a32
+++ gdb-6.3/gdb/gstack.sh	2006-04-14 03:17:12.000000000 -0300
bc67a32
@@ -17,17 +17,17 @@ fi
cb077a3
 backtrace="bt"
cb077a3
 if test -d /proc/$1/task ; then
cb077a3
     # Newer kernel; has a task/ directory.
cb077a3
-    if test `ls /proc/$1/task | wc -l` -gt 1 2>/dev/null ; then
cb077a3
+    if test `/bin/ls /proc/$1/task | /usr/bin/wc -l` -gt 1 2>/dev/null ; then
cb077a3
 	backtrace="thread apply all bt"
cb077a3
     fi
cb077a3
 elif test -f /proc/$1/maps ; then
cb077a3
     # Older kernel; go by it loading libpthread.
cb077a3
-    if grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
cb077a3
+    if /bin/grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
cb077a3
 	backtrace="thread apply all bt"
cb077a3
     fi
cb077a3
 fi
cb077a3
 
cb077a3
-GDB=${GDB:-gdb}
cb077a3
+GDB=${GDB:-/usr/bin/gdb}
cb077a3
 
cb077a3
 if $GDB -nx --quiet --batch --readnever > /dev/null 2>&1; then
cb077a3
     readnever=--readnever
bc67a32
@@ -39,7 +39,7 @@ fi
cb077a3
 $GDB --quiet $readnever -nx /proc/$1/exe $1 <<EOF 2>&1 | 
cb077a3
 $backtrace
cb077a3
 EOF
cb077a3
-sed -n \
cb077a3
+/bin/sed -n \
cb077a3
     -e 's/^(gdb) //' \
cb077a3
     -e '/^#/p' \
cb077a3
     -e '/^Thread/p'