[0/9] Create gdb.debug, gdb.cmd and gdb.in files when running the testsuite

Message ID 20190514151238.8765-1-alan.hayward@arm.com
Headers show
Series
  • Create gdb.debug, gdb.cmd and gdb.in files when running the testsuite
Related show

Message

Alan Hayward May 14, 2019, 3:12 p.m.
Create gdb.debug, gdb.cmd and gdb.in files when running the testsuite

Extended version of a previous series.
This series is intended to help with reproducing tests and extracting debug
information from them.

Firstly, this 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.

Secondly, whenever a test is run, gdb.in and gdb.cmd files will be created
containing the input passed to gdb and the command line used to launch gdb.
This allows a user to quickly rerun a test outside of dejagnu - a script is
added to automate that process too.

Thirdly, GDBSERVER_DEBUG is extended to support the saving of gdbreply output
to a gdbserver.replay file.

I'll do a follow on patch for the NEWS file and look at updating the wiki with
examples.


Alan Hayward (9):
  Change file close behavior for tee_file
  Add debug redirect option
  testsuite: Add option to capture GDB debug
  testsuite: Disable some tests when logging
  testsuite: Record all gdb input to gdb.in
  testsuite: Create .cmd files for gdb and gdbserver
  testsuite: Add replay logging to GDBSERVER_DEBUG
  testsuite: Add script to quickly re-run tests
  testsuite: Remove TRANSCRIPT support

 gdb/cli/cli-interp.c                          |  54 +++--
 gdb/cli/cli-interp.h                          |  16 +-
 gdb/cli/cli-logging.c                         |  45 ++--
 gdb/disasm.c                                  |   4 +-
 gdb/interps.c                                 |   6 +-
 gdb/interps.h                                 |  10 +-
 gdb/mi/mi-common.h                            |  14 +-
 gdb/mi/mi-interp.c                            |  31 ++-
 gdb/testsuite/Makefile.in                     |   5 +-
 gdb/testsuite/README                          |  83 ++++---
 .../gdb.base/breakpoint-in-ro-region.exp      |   6 +
 gdb/testsuite/gdb.base/debug-expr.exp         |   6 +
 gdb/testsuite/gdb.base/foll-fork.exp          |   6 +
 gdb/testsuite/gdb.base/foll-vfork.exp         |   6 +
 .../gdb.base/fork-print-inferior-events.exp   |   6 +
 gdb/testsuite/gdb.base/gdb-sigterm.exp        |   6 +
 gdb/testsuite/gdb.base/gdbinit-history.exp    |   5 +
 gdb/testsuite/gdb.base/osabi.exp              |   6 +
 .../gdb.base/sss-bp-on-user-bp-2.exp          |   6 +
 gdb/testsuite/gdb.base/ui-redirect.exp        |  67 +++++-
 gdb/testsuite/gdb.gdb/unittest.exp            |   6 +
 gdb/testsuite/gdb.mi/mi-break.exp             |   9 +-
 gdb/testsuite/gdb.mi/mi-watch.exp             |   9 +-
 gdb/testsuite/gdb.mi/new-ui-mi-sync.exp       |   5 +
 .../gdb.mi/user-selected-context-sync.exp     |   5 +
 gdb/testsuite/gdb.python/python.exp           |   5 +-
 .../gdb.threads/check-libthread-db.exp        |   6 +
 ...al-while-stepping-over-bp-other-thread.exp |   6 +
 .../gdb.threads/stepi-random-signal.exp       |   6 +
 gdb/testsuite/lib/gdb.exp                     | 217 ++++++++++++------
 gdb/testsuite/lib/gdbserver-support.exp       |  72 +++++-
 gdb/testsuite/replaytest                      | 147 ++++++++++++
 gdb/ui-file.c                                 |  11 +-
 gdb/ui-file.h                                 |  15 +-
 34 files changed, 700 insertions(+), 207 deletions(-)
 create mode 100755 gdb/testsuite/replaytest

-- 
2.20.1 (Apple Git-117)