[gdb/testsuite] Fix gdb.dwarf2/dw2-using-debug-str.exp with cc-with-gdb-index
authorTom de Vries <tdevries@suse.de>
Mon, 2 Aug 2021 13:31:51 +0000 (15:31 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 2 Aug 2021 13:31:51 +0000 (15:31 +0200)
commitf7ded54b34dcfb2a8e7088c0045f835aab75963a
tree7c2446bee85820e383e3a3d351b4404416ebe56a
parent1df42e90836a542aa16b2f89b22810d264bb3882
[gdb/testsuite] Fix gdb.dwarf2/dw2-using-debug-str.exp with cc-with-gdb-index

When running with target board cc-with-gdb-index, we run into:
...
(gdb) file dw2-using-debug-str-no-debug-str^M
Reading symbols from dw2-using-debug-str-no-debug-str...^M
Dwarf Error: DW_FORM_strp used without required section^M
(gdb) FAIL: gdb.dwarf2/dw2-using-debug-str.exp: file dw2-using-debug-str
...

The test expects the dwarf error, but has no matching pattern for the entire
output.

Fix this by updating the regexp.

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2021-08-02  Tom de Vries  <tdevries@suse.de>

* gdb.dwarf2/dw2-using-debug-str.exp: Update regexp to match
cc-with-gdb-index output.
gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp