1 Index: gdb-6.3/gdb/gstack.sh
2 ===================================================================
3 --- gdb-6.3.orig/gdb/gstack.sh 2006-02-14 17:21:05.000000000 -0200
4 +++ gdb-6.3/gdb/gstack.sh 2006-04-14 03:17:12.000000000 -0300
7 if test -d /proc/$1/task ; then
8 # Newer kernel; has a task/ directory.
9 - if test `ls /proc/$1/task | wc -l` -gt 1 2>/dev/null ; then
10 + if test `/bin/ls /proc/$1/task | /usr/bin/wc -l` -gt 1 2>/dev/null ; then
11 backtrace="thread apply all bt"
13 elif test -f /proc/$1/maps ; then
14 # Older kernel; go by it loading libpthread.
15 - if grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
16 + if /bin/grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
17 backtrace="thread apply all bt"
22 +GDB=${GDB:-/usr/bin/gdb}
24 if $GDB -nx --quiet --batch --readnever > /dev/null 2>&1; then
27 $GDB --quiet $readnever -nx /proc/$1/exe $1 <<EOF 2>&1 |