aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/Makefile.in
diff options
context:
space:
mode:
authorAlan Hayward <alan.hayward@arm.com>2019-04-12 16:36:51 +0100
committerAlan Hayward <alan.hayward@arm.com>2019-04-25 16:37:03 +0100
commitdd06d4d6889ee58b76255b775f52ba8e475a7a2d (patch)
tree76beeb6ca041398cc0e7d01c7f96af3d940e13d1 /gdb/testsuite/Makefile.in
parent6fe014bcd33686cb75e6355f9c36ce483a64ec62 (diff)
downloadbinutils-dd06d4d6889ee58b76255b775f52ba8e475a7a2d.zip
binutils-dd06d4d6889ee58b76255b775f52ba8e475a7a2d.tar.gz
binutils-dd06d4d6889ee58b76255b775f52ba8e475a7a2d.tar.bz2
testsuite: Add option to capture gdbserver debug
Add both board option and environment variable which enables gdbserver debug and sends it to the file gdbserver.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 gdbserver debug enabled in the following way: make check GDBSERVER_DEBUG=all Disable tspeed.exp when debugging to prevent the log file filling many gigabytes then timing out. gdb/testsuite/ChangeLog: * Makefile.in: Pass through GDBSERVER_DEBUG. * README (Testsuite Parameters): Add GDBSERVER_DEBUG. (gdbserver,debug): Add board setting. * gdb.trace/tspeed.exp: Skip when debugging. * lib/gdb.exp (gdbserver_debug_enabled): New procedure. * lib/gdbserver-support.exp: Likewise
Diffstat (limited to 'gdb/testsuite/Makefile.in')
-rw-r--r--gdb/testsuite/Makefile.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/Makefile.in b/gdb/testsuite/Makefile.in
index 6ee4fc3..8d46fe1 100644
--- a/gdb/testsuite/Makefile.in
+++ b/gdb/testsuite/Makefile.in
@@ -52,6 +52,8 @@ RUNTESTFLAGS =
FORCE_PARALLEL =
+GDBSERVER_DEBUG =
+
# Default number of iterations that we will use to run the testsuite
# if the user does not specify the RACY_ITER environment variable
# (e.g., when the user calls the make rule directly from the command
@@ -162,13 +164,15 @@ check-read1:
# status.
TIMESTAMP = $(if $(TS),| $(srcdir)/print-ts.py $(if $(TS_FORMAT),$(TS_FORMAT),),)
+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 ; \
+ EXEEXT=${EXEEXT} ; export EXEEXT ; $(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 \