summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-09-29 19:29:27 +0200
committerFlorian Pritz <bluewind@xssn.at>2010-09-29 19:29:27 +0200
commite11cba2b63aa12c8535e1003ff9731b82f6bff00 (patch)
tree977b2a42310a7f617b66017dbd1c77f509ad66b0
parentfb5ea39dd4689e7a7eb8fb34984e3bfe2a8d4be4 (diff)
downloadbin-e11cba2b63aa12c8535e1003ff9731b82f6bff00.tar.gz
bin-e11cba2b63aa12c8535e1003ff9731b82f6bff00.tar.xz
add backtrace
Signed-off-by: Florian Pritz <bluewind@xssn.at>
-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"