1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-20 14:03:59 +03:00

22 lines
271 B
Plaintext
Raw Normal View History

#!/bin/sh
ENV="$1"
shift 1
TMPFILE=`mktemp --tmpdir gdb_run.XXXXXXXXXX`
test -n "${TMPFILE}" || {
echo "mktemp doesn't work" 1>&2
exit 1
}
cat << EOF > $TMPFILE
run
bt
EOF
trap "/bin/rm -f $TMPFILE" EXIT
CMD="gdb -x $TMPFILE --args $@"
echo $CMD
eval $ENV "$CMD"