[PATCHv2,1/3] gdb: fix GDB_DEBUG and GDBSERVER_DEBUG Makefile variables

Message ID 3f3ed68b36767340010dc080dbf3c35fbe6f2af6.1701369189.git.aburgess@redhat.com
State New
Series Improve debug output support in gdbserver |


Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Testing passed
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Testing passed

Commit Message

Andrew Burgess Nov. 30, 2023, 6:44 p.m. UTC
  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  \

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

With this done, this debug feature is now working as expected.
 gdb/Makefile.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)


diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 3510577f090..0886c0e8495 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -993,7 +993,10 @@  TARGET_FLAGS_TO_PASS = \
+	"TESTS=$(TESTS)" \
 # All source files that go into linking GDB.