This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 0/4] Capture GDB debug when running the testsuite
- From: Alan Hayward <Alan dot Hayward at arm dot com>
- To: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Cc: nd <nd at arm dot com>, Alan Hayward <Alan dot Hayward at arm dot com>
- Date: Tue, 23 Apr 2019 13:06:30 +0000
- Subject: [PATCH 0/4] Capture GDB debug when running the testsuite
This series adds the ability to capture GDB debug when running the testsuite.
For example:
make check GDB_DEBUG="infrun,remote,serial,jit,frame"
Debug output is saved to gdb.debug in the test directory, along with all of
the gdb output for the test. I'm hoping this will come in useful for anyone
debugging testsuite runs.
I've fixed up many of the failures that turning debugging on creates, but there
may be more failures when using debug options I've not tested. This should
be easy enough to work around for anyone using the option.
I'll do a follow on patch for the NEWS file.
Maybe something needs adding to the gdb wiki too?
This is fully compatible with the gdbserver debug patches (the final remaining
patch is included in this series). For example, you can do:
make check "RUNTESTFLAGS=--target_board native-gdbserver" GDBSERVER_DEBUG=all GDB_DEBUG="infrun,remote"
The first patch adds cli support, for which I also propose an alternative.
Patch two adds all the testsuite support.
Patch three fixes up failing tests when using debug.
Patch four is repost of:
[PATCH v2] testsuite: Add option to capture gdbserver debug
https://sourceware.org/ml/gdb-patches/2019-04/msg00295.html
With the slight difference is that I've changed the name of the output file
to match the above code (now gdbserver.debug instead of gdbserver.log).
Alan Hayward (4):
Add debug redirect option
testsuite: Add option to capture GDB debug
testsuite: Disable tests when logging
testsuite: Add option to capture gdbserver debug
gdb/cli/cli-interp.c | 25 +++++----
gdb/cli/cli-interp.h | 21 +------
gdb/cli/cli-logging.c | 45 ++++++++-------
gdb/disasm.c | 4 +-
gdb/interps.c | 6 +-
gdb/interps.h | 10 +++-
gdb/mi/mi-common.h | 3 +-
gdb/mi/mi-interp.c | 15 +++--
gdb/testsuite/Makefile.in | 8 ++-
gdb/testsuite/README | 35 ++++++++++++
.../gdb.base/breakpoint-in-ro-region.exp | 5 ++
gdb/testsuite/gdb.base/debug-expr.exp | 5 ++
gdb/testsuite/gdb.base/foll-fork.exp | 5 ++
gdb/testsuite/gdb.base/foll-vfork.exp | 5 ++
.../gdb.base/fork-print-inferior-events.exp | 5 ++
gdb/testsuite/gdb.base/gdb-sigterm.exp | 5 ++
gdb/testsuite/gdb.base/gdbinit-history.exp | 5 ++
gdb/testsuite/gdb.base/osabi.exp | 5 ++
.../gdb.base/sss-bp-on-user-bp-2.exp | 5 ++
gdb/testsuite/gdb.base/ui-redirect.exp | 5 ++
gdb/testsuite/gdb.gdb/unittest.exp | 5 ++
gdb/testsuite/gdb.mi/mi-break.exp | 8 ++-
gdb/testsuite/gdb.python/python.exp | 5 +-
.../gdb.threads/check-libthread-db.exp | 5 ++
...al-while-stepping-over-bp-other-thread.exp | 5 ++
.../gdb.threads/stepi-random-signal.exp | 5 ++
gdb/testsuite/gdb.trace/tspeed.exp | 5 ++
gdb/testsuite/lib/gdb.exp | 56 +++++++++++++++++++
gdb/testsuite/lib/gdbserver-support.exp | 38 ++++++++++++-
29 files changed, 287 insertions(+), 67 deletions(-)
--
2.20.1 (Apple Git-117)