diff options
-rwxr-xr-x | backtrace | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/backtrace b/backtrace new file mode 100755 index 0000000..9b49e47 --- /dev/null +++ b/backtrace @@ -0,0 +1,11 @@ +#!/bin/bash + +if [[ -z $1 ]]; then + echo "usage: backtrace <executeable> [<arguments> ...]" + exit 1 +fi + +prog=$1; shift +args="$*" + +exec gdb -batch -ex "run $args" -ex "backtrace" "$prog" |