]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: fix GDB_DEBUG and GDBSERVER_DEBUG Makefile variables
authorAndrew Burgess <aburgess@redhat.com>
Wed, 22 Nov 2023 15:57:56 +0000 (15:57 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Fri, 8 Dec 2023 17:52:00 +0000 (17:52 +0000)
The gdb/testsuite/README file documents GDB_DEBUG and GDBSERVER_DEBUG
flags, which can be passed to make in order to enable debugging within
GDB or gdbserver respectively.

However, when I do:

  make check-gdb GDB_DEBUG=infrun

I don't see the corresponding debug feature within GDB being enabled.
Nor does:

  make check-gdb GDBSERVER_DEBUG=debug  \
       RUNTESTFLAGS="--target_board=native-extended-gdbserver"

Appear to enable gdbserver debugging.

I tracked this down to the GDB_DEBUG and GDBSERVER_DEBUG flags being
missing from the TARGET_FLAGS_TO_PASS variable in gdb/Makefile.  This
variable already contains lots of testing related flags, like
RUNTESTFLAGS and TESTS, so I think it makes sense to add GDB_DEBUG and
GDBSERVER_DEBUG here too.

With this done, this debug feature is now working as expected.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/Makefile.in

index 3510577f0903d72f389e3b4646cbab0138958e68..0886c0e84952dcb9f99279937b9111edb87a5599 100644 (file)
@@ -993,7 +993,10 @@ TARGET_FLAGS_TO_PASS = \
        "RUNTEST=$(RUNTEST)" \
        "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
        "FORCE_PARALLEL=$(FORCE_PARALLEL)" \
-       "TESTS=$(TESTS)"
+       "TESTS=$(TESTS)" \
+       "GDB_DEBUG=$(GDB_DEBUG)" \
+       "GDBSERVER_DEBUG=$(GDBSERVER_DEBUG)" \
+
 
 # All source files that go into linking GDB.