gdb/testsuite: update tests looking for "DWARF 2" debug format
authorSimon Marchi <simon.marchi@polymtl.ca>
Thu, 2 Dec 2021 15:28:40 +0000 (10:28 -0500)
committerSimon Marchi <simon.marchi@polymtl.ca>
Thu, 2 Dec 2021 16:54:51 +0000 (11:54 -0500)
commitd184a3c16a0f1c3c235713337ffb61b730e4a940
tree4a2f02ad49403385b446723832ed21f3964fec15
parent9a73e1cafedc2e3a466b6193a460cb8062fa0a59
gdb/testsuite: update tests looking for "DWARF 2" debug format

Commit ab557072b8ec ("gdb: use actual DWARF version in compunit's
debugformat field") changes the debug format string in "info source" to
show the actual DWARF version, rather than always show "DWARF 2".

However, it failed to consider that some tests checked for the "DWARF 2"
string to see if the test program is compiled with DWARF debug
information.  Since everything is compiled with DWARF 4 or 5 nowadays,
that changed the behavior of those tests.  Notably, it prevent the
tests using skip_inline_var_tests to run.

Grep through the testsuite for "DWARF 2" and change all occurrences I
could find to use "DWARF [0-9]" instead (that string is passed to TCL's
string match).

Change-Id: Ic7fb0217fb9623880c6f155da6becba0f567a885
gdb/testsuite/gdb.base/complex.exp
gdb/testsuite/gdb.base/constvars.exp
gdb/testsuite/gdb.base/included.exp
gdb/testsuite/gdb.base/structs.exp
gdb/testsuite/gdb.base/volatile.exp
gdb/testsuite/gdb.cp/class2.exp
gdb/testsuite/gdb.cp/m-static.exp
gdb/testsuite/gdb.dwarf2/pr10770.exp
gdb/testsuite/lib/gdb.exp