Browse - programming tips - linux stack traceDate: 2009jan24 OS: Linux Q. I have a core files, now how can I get a stack trace from it? A. Save this script as /usr/local/bin/stack_trace and use it: #!/bin/sh Usage() { echo "Usage: stack_trace <pgm> <core>" exit 1 } if [ $# -ne 2 ]; then Usage fi PGM=$1 CORE=$2 ( echo bt echo quit sleep 10 ) | gdb $PGM $CORE
Add a commentSign in to add a comment | Advertisements:
|