diff options
author | Alan Hayward <alan.hayward@arm.com> | 2019-05-17 14:35:23 +0100 |
---|---|---|
committer | Alan Hayward <alan.hayward@arm.com> | 2019-05-17 14:35:55 +0100 |
commit | 29b523140ecf72bc3fdf570c71fbda6fe85cf930 (patch) | |
tree | e646b922006aac57b873ce1099beef6b45d4e46a /gdb/testsuite/Makefile.in | |
parent | ca1285d17534cff3041c07ac7841288e1b3ba19c (diff) | |
download | binutils-29b523140ecf72bc3fdf570c71fbda6fe85cf930.zip binutils-29b523140ecf72bc3fdf570c71fbda6fe85cf930.tar.gz binutils-29b523140ecf72bc3fdf570c71fbda6fe85cf930.tar.bz2 |
testsuite: Add option to capture GDB debug
Add both board option and environment variable which enables gdb
debug via a comma separated list and sends it to the file gdb.debug,
located in the output directory for the current test. Document this.
Add support for the environment variable in the Makefile.
The testsuite can be run with gdb debug enabled in the following way:
make check GDB_DEBUG="infrun,target,remote"
A Test with multiple invocations of GDB will all append debug to the
same log file.
gdb/testsuite/ChangeLog:
* Makefile.in: Pass through GDB_DEBUG.
* README (Testsuite Parameters): Add GDB_DEBUG.
(gdb,debug): Add board setting.
* lib/gdb.exp (default_gdb_start): Start debugging.
(gdb_debug_enabled): New procedure.
(gdb_debug_init): Likewise.
Diffstat (limited to 'gdb/testsuite/Makefile.in')
-rw-r--r-- | gdb/testsuite/Makefile.in | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in index 8d46fe1..2beba05 100644 --- a/gdb/testsuite/Makefile.in +++ b/gdb/testsuite/Makefile.in @@ -52,6 +52,7 @@ RUNTESTFLAGS = FORCE_PARALLEL = +GDB_DEBUG = GDBSERVER_DEBUG = # Default number of iterations that we will use to run the testsuite @@ -164,15 +165,17 @@ check-read1: # status. TIMESTAMP = $(if $(TS),| $(srcdir)/print-ts.py $(if $(TS_FORMAT),$(TS_FORMAT),),) +gdb_debug = $(if $(GDB_DEBUG),GDB_DEBUG=$(GDB_DEBUG) ; export GDB_DEBUG ;,) gdbserver_debug = $(if $(GDBSERVER_DEBUG),GDBSERVER_DEBUG=$(GDBSERVER_DEBUG) ; export GDBSERVER_DEBUG ;,) + # All the hair to invoke dejagnu. A given invocation can just append # $(RUNTESTFLAGS) DO_RUNTEST = \ rootme=`pwd`; export rootme; \ srcdir=${srcdir} ; export srcdir ; \ EXPECT=${EXPECT} ; export EXPECT ; \ - EXEEXT=${EXEEXT} ; export EXEEXT ; $(gdbserver_debug) \ + EXEEXT=${EXEEXT} ; export EXEEXT ; $(gdb_debug) $(gdbserver_debug) \ $(RPATH_ENVVAR)=$$rootme/../../expect:$$rootme/../../libstdc++:$$rootme/../../tk/unix:$$rootme/../../tcl/unix:$$rootme/../../bfd:$$rootme/../../opcodes:$$$(RPATH_ENVVAR); \ export $(RPATH_ENVVAR); \ if [ -f $${rootme}/../../expect/expect ] ; then \ |