binutils-gdb/gdb/testsuite/lib
Andrew Burgess d57cbee932 gdb/testsuite/fortran: Fix info-modules/info-types for gfortran 8+
The gdb.fortran/info-modules.exp and gdb.fortran/info-types.exp tests
are failing on versions of gfortran after 7.3 due to the inclusion of
extra "system" modules and type that were not being matched by the
current test patterns.

Rather than building increasingly complex patterns that would always
be at risk of breaking with future versions of GCC I have instead
added a new library that parses the output of the following commands:

  info types
  info variables
  info functions
  info modules
  info module functions
  info module variables

into a data structure, the test can than run checks against the
contents of this data structure.

The benefit is that we can simply ignore extra results that we don't
care about.

There is a small risk that a bug in GDB might allow us to start
reporting incorrect results in such a way that the new library will
not spot the error.  However, I have tried to mitigate this risk by
adding extra procedures into the test library (see check_no_entry) and
we can add more in future if we wanted to be even more defensive.

I tested this test file with gFortran 7.3.1, 8.3.0, and 9.2.0, I now
see 100% pass in all cases.

gdb/testsuite/ChangeLog:

	* gdb.fortran/info-modules.exp: Rewrite to make use of new
	sym-info-cmds library.
	* gdb.fortran/info-types.exp: Likewise.
	* lib/sym-info-cmds.exp: New file.

Change-Id: Iff81624f51b5afb6c95393932f3d94472d7c2970
2019-12-09 13:06:05 +00:00
..
ada.exp [gdb/testsuite] Fix ada tests with -fPIE/-pie 2019-10-10 11:51:34 +02:00
append_gdb_boards_dir.exp
build-piece.exp
cache.exp
cl_util.c
cl_util.h
compile-support.exp
compiler.c [gdb] Fix more typos in comments (2) 2019-10-26 09:55:32 +02:00
compiler.cc [gdb] Fix more typos in comments (2) 2019-10-26 09:55:32 +02:00
completion-support.exp Add check for readline support to more GDB tab-completion tests. 2019-08-04 14:26:39 -07:00
cp-support.exp
d-support.exp
data-structures.exp
dtrace.exp
dwarf.exp
fortran.exp [gdb/testsuite] Fix gdb.fortran/info-types.exp regexp 2019-08-29 14:43:11 +02:00
future.exp
gdb-guile.exp
gdb-python.exp
gdb-utils.exp Introduce metadata style 2019-10-01 15:12:40 -06:00
gdb.exp gdb/testsuite: Use -J option when compiling Fortran tests 2019-12-04 20:33:36 +00:00
gdbserver-support.exp [gdb/testsuite] Fix gdb_target_cmd 2019-09-19 01:14:19 +02:00
gen-perf-test.exp
go.exp
memory.exp
mi-support.exp [gdb/testsuite] Test skip_libstdcxx_probe_tests in mi-catch-cpp-exceptions.exp 2019-07-25 18:39:31 +02:00
objc.exp
opencl_hostapp.c
opencl_kernel.cl
opencl.exp
pascal.exp [gdb/testsuite] Clean up stale exec in gdb_compile_pascal 2019-08-20 17:18:09 +02:00
pdtrace.in
perftest.exp
prelink-support.exp
prompt.exp
range-stepping-support.exp
read1.c [gdb/testsuite] Work around tcl bug in libsegfault.exp with check-read1 2019-07-30 16:15:46 +02:00
rust-support.exp
selftest-support.exp
set_unbuffered_mode.c
sym-info-cmds.exp gdb/testsuite/fortran: Fix info-modules/info-types for gfortran 8+ 2019-12-09 13:06:05 +00:00
trace-support.exp
tuiterm.exp Make TUI resizing tests more robust 2019-11-12 12:29:14 -07:00
unbuffer_output.c
valgrind.exp