summaryrefslogtreecommitdiffstats
path: root/backtrace
diff options
context:
space:
mode:
Diffstat (limited to 'backtrace')
-rwxr-xr-xbacktrace11
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"