]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/testsuite: use the correct .debug_str section name for DW_FORM_strp
authorAndrew Burgess <andrew.burgess@embecosm.com>
Wed, 17 Mar 2021 18:07:32 +0000 (18:07 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Mon, 22 Mar 2021 10:00:19 +0000 (10:00 +0000)
commit1e7fcccb8d6d0a6bd295a50400c553cc595250f1
treeb4a2d6cc035441ab202427c8d71ab309d465ca68
parentd171632faa9f563f47224e0f6214f8860ed7bcc4
gdb/testsuite: use the correct .debug_str section name for DW_FORM_strp

When handling DWARF attributes of the form DW_FORM_strp the strings
should be placed in the .debug_str section, not .debug_string as they
currently are by the DWARF assembler (in lib/dwarf.exp).

I've added a test.  This is as much to test the DWARF generator as it
is to test GDB as GCC makes frequent use of DW_FORM_strp so we can be
pretty sure this part of GDB is already well tested.

gdb/testsuite/ChangeLog:

* gdb.dwarf2/dw2-using-debug-str.c: New file.
* gdb.dwarf2/dw2-using-debug-str.exp: New file.
* lib/dwarf.exp (Dwarf::DW_FORM_strp): Create .debug_str section,
not .debug_string.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.c [new file with mode: 0644]
gdb/testsuite/gdb.dwarf2/dw2-using-debug-str.exp [new file with mode: 0644]
gdb/testsuite/lib/dwarf.exp