cb077a38c2
175270, BZ 175083, maybe BZ 172938). - Hardcode /bin and /usr/bin paths into gstack (BZ 179829). - Build in a subdir of the source tree instead of in a sibling directory. - Switch to versioning scheme that uses the same base revision number for all OSes, and uses a suffix to tell the builds apart and ensure upgradability.
34 lines
1.0 KiB
Diff
34 lines
1.0 KiB
Diff
Index: gdb-6.3/gdb/gstack.sh
|
|
--- gdb-6.3/gdb/gstack.sh 2006-01-16 16:41:13.000000000 +0000
|
|
+++ gdb-6.3/gdb/gstack.sh 2006-02-02 09:22:12.000000000 +0000
|
|
@@ -17,17 +17,17 @@
|
|
backtrace="bt"
|
|
if test -d /proc/$1/task ; then
|
|
# Newer kernel; has a task/ directory.
|
|
- if test `ls /proc/$1/task | wc -l` -gt 1 2>/dev/null ; then
|
|
+ if test `/bin/ls /proc/$1/task | /usr/bin/wc -l` -gt 1 2>/dev/null ; then
|
|
backtrace="thread apply all bt"
|
|
fi
|
|
elif test -f /proc/$1/maps ; then
|
|
# Older kernel; go by it loading libpthread.
|
|
- if grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
|
|
+ if /bin/grep -e libpthread /proc/$1/maps > /dev/null 2>&1 ; then
|
|
backtrace="thread apply all bt"
|
|
fi
|
|
fi
|
|
|
|
-GDB=${GDB:-gdb}
|
|
+GDB=${GDB:-/usr/bin/gdb}
|
|
|
|
if $GDB -nx --quiet --batch --readnever > /dev/null 2>&1; then
|
|
readnever=--readnever
|
|
@@ -39,7 +39,7 @@
|
|
$GDB --quiet $readnever -nx /proc/$1/exe $1 <<EOF 2>&1 |
|
|
$backtrace
|
|
EOF
|
|
-sed -n \
|
|
+/bin/sed -n \
|
|
-e 's/^(gdb) //' \
|
|
-e '/^#/p' \
|
|
-e '/^Thread/p'
|