2019-06-06 22:45:39 -03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# we want everything on stderr, so the program is not disturbed
|
|
|
|
exec 1>&2
|
|
|
|
|
|
|
|
PID=$1
|
|
|
|
TMPFILE=/tmp/gdb.$$
|
|
|
|
cat << EOF > $TMPFILE
|
|
|
|
set height 0
|
|
|
|
bt full
|
|
|
|
thread apply all bt full
|
|
|
|
quit
|
|
|
|
EOF
|
2019-07-17 00:10:05 -03:00
|
|
|
gdb -n -batch -x $TMPFILE --pid $PID < /dev/null 2>&1
|
2019-06-06 22:45:39 -03:00
|
|
|
/bin/rm -f $TMPFILE
|