svn commit: samba r22312 - in branches/SAMBA_4_0/source: . script
metze at samba.org
metze at samba.org
Tue Apr 17 15:55:08 GMT 2007
Author: metze
Date: 2007-04-17 15:55:08 +0000 (Tue, 17 Apr 2007)
New Revision: 22312
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22312
Log:
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
Added:
branches/SAMBA_4_0/source/script/gdb_run
Modified:
branches/SAMBA_4_0/source/main.mk
Changeset:
Modified: branches/SAMBA_4_0/source/main.mk
===================================================================
--- branches/SAMBA_4_0/source/main.mk 2007-04-17 15:33:50 UTC (rev 22311)
+++ branches/SAMBA_4_0/source/main.mk 2007-04-17 15:55:08 UTC (rev 22312)
@@ -330,15 +330,15 @@
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
Added: branches/SAMBA_4_0/source/script/gdb_run
===================================================================
--- branches/SAMBA_4_0/source/script/gdb_run 2007-04-17 15:33:50 UTC (rev 22311)
+++ branches/SAMBA_4_0/source/script/gdb_run 2007-04-17 15:55:08 UTC (rev 22312)
@@ -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"
Property changes on: branches/SAMBA_4_0/source/script/gdb_run
___________________________________________________________________
Name: svn:executable
+ *
More information about the samba-cvs
mailing list