summaryrefslogtreecommitdiffstats
path: root/gdb-exec
blob: b95c7f94ec9783965a786811236a38dd38289f91 (plain)
1
2
3
4
5
6
7
8
9
10
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"