1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/selftest/gdb_run
2008-10-28 12:20:59 +01:00

21 lines
229 B
Bash
Executable File

#!/bin/sh
ENV="$1"
shift 1
if test -z "$TMPDIR"; then
TMPDIR="/tmp"
fi
TMPFILE=$TMPDIR/gdb_run.$$
cat << EOF > $TMPFILE
run
bt
EOF
trap "/bin/rm -f $TMPFILE" EXIT
CMD="gdb -x $TMPFILE --args $@"
echo $CMD
eval $ENV "$CMD"