summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-04-18 11:30:35 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-04-18 11:30:35 +0200
commitc0e5152416285ab51e72921de692022c779ddc93 (patch)
tree4024ad2d28c3722bee7da2020d8486575a07d183
parent35dda678c52bb2f27b2f5b1d07b5853f74234644 (diff)
downloadbin-c0e5152416285ab51e72921de692022c779ddc93.tar.gz
bin-c0e5152416285ab51e72921de692022c779ddc93.tar.xz
add gdb-exec
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xgdb-exec11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb-exec b/gdb-exec
new file mode 100755
index 0000000..b95c7f9
--- /dev/null
+++ b/gdb-exec
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+if [[ -z $1 ]]; then
+ echo "usage: gdb-exec <executeable> [<arguments> ...]"
+ exit 1
+fi
+
+prog=$1; shift
+args="$*"
+
+exec gdb -ex "set args $args" "$prog"