summaryrefslogtreecommitdiffstats
path: root/source4/script/gdb_run
blob: bfefce1ac998a414ff0c3906435a3b8146e77480 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

if test -z "$TMPDIR"; then
	TMPDIR="/tmp"
fi

TMPFILE=$TMPDIR/gdb_run.$$
cat << EOF  > $TMPFILE
run
bt
quit
EOF

trap "/bin/rm -f $TMPFILE" EXIT
CMD="gdb -x $TMPFILE --args $@"
echo $CMD
eval "$CMD"