3 # Print the stack backtrace of a crashed program
5 # Luiz Fernando N. Capitulino <lcapitulino@gmail.com>
12 echo "getbt: Print the stack backtrace of a crashed program"
13 echo "Usage: $(basename $0) < program > < core-file >"
21 if [ "$1" = "-h" -o "$1" = "--help" ]; then
26 # print only the trace
27 gdb
-nx -silent $BINARY $CORE <<<bt | egrep '^#'