1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

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 4a95e89308)
This commit is contained in:
Stefan Metzmacher 2007-04-17 15:55:08 +00:00 committed by Gerald (Jerry) Carter
parent cc098d19bc
commit 45e8a27d98
2 changed files with 20 additions and 3 deletions

View File

@ -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

17
source4/script/gdb_run Executable file
View File

@ -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"