1#!/bin/sh 2 3# we want everything on stderr, so the program is not disturbed 4exec 1>&2 5 6PID=$1 7TMPFILE=/tmp/gdb.$$ 8cat << EOF > $TMPFILE 9set height 0 10bt full 11thread apply all bt full 12quit 13EOF 14gdb -n -batch -x $TMPFILE --pid $PID < /dev/null 2>&1 15rm -f $TMPFILE 16 17