From 45e8a27d984d3d75ba8ebca1ef3522b2f0fb3d4d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 17 Apr 2007 15:55:08 +0000 Subject: r22312: avoid the need of typing 'run' into each gdb xterm if someone knows how to tell gdb to only exit if 'run' exists clean via the if/else logic please tell me! see http://davis.lbl.gov/Manuals/GDB/gdb_20.html#SEC194) but there's no useful example :-( metze (This used to be commit 4a95e893087e6e3194cd18289a9bf019d0f0abde) --- source4/script/gdb_run | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 source4/script/gdb_run (limited to 'source4/script') diff --git a/source4/script/gdb_run b/source4/script/gdb_run new file mode 100755 index 0000000000..bfefce1ac9 --- /dev/null +++ b/source4/script/gdb_run @@ -0,0 +1,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" -- cgit