diff options
author | Stefan Metzmacher <metze@samba.org> | 2007-04-17 15:55:08 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:51:01 -0500 |
commit | 45e8a27d984d3d75ba8ebca1ef3522b2f0fb3d4d (patch) | |
tree | 1a26d98c3dae1c48aeab297499a3a24f6e0efb45 | |
parent | cc098d19bc3df836cceb78cb6463eb1b59e93e36 (diff) | |
download | samba-45e8a27d984d3d75ba8ebca1ef3522b2f0fb3d4d.tar.gz samba-45e8a27d984d3d75ba8ebca1ef3522b2f0fb3d4d.tar.bz2 samba-45e8a27d984d3d75ba8ebca1ef3522b2f0fb3d4d.zip |
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)
-rw-r--r-- | source4/main.mk | 6 | ||||
-rwxr-xr-x | source4/script/gdb_run | 17 |
2 files changed, 20 insertions, 3 deletions
diff --git a/source4/main.mk b/source4/main.mk index fe68db1526..4084d7ba4b 100644 --- a/source4/main.mk +++ b/source4/main.mk @@ -330,15 +330,15 @@ valgrindtest-env: everything gdbtest: gdbtest-quick gdbtest-quick: all - SMBD_VALGRIND="xterm -n smbd -e gdb --args " \ + SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run " \ $(SELFTEST) --immediate --quick --socket-wrapper gdbtest-all: everything - SMBD_VALGRIND="xterm -n smbd -e gdb --args " \ + SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run " \ $(SELFTEST) --immediate --socket-wrapper gdbtest-env: everything - SMBD_VALGRIND="xterm -n smbd -e gdb --args " \ + SMBD_VALGRIND="xterm -n smbd -e $(srcdir)/script/gdb_run " \ $(SELFTEST) --socket-wrapper --testenv wintest: all 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" |