]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/testsuite: introduce dwarf5 option to gdb_compile
authorGuinevere Larsen <blarsen@redhat.com>
Thu, 2 May 2024 16:57:47 +0000 (13:57 -0300)
committerGuinevere Larsen <guinevere@redhat.com>
Wed, 23 Oct 2024 17:16:37 +0000 (14:16 -0300)
commit05eba57965ef17979e3378e7463293fa070ace39
treeeb61c5ca1544742bf42454850109e3f0afcc547b
parent538271a1e0b39d3e39f304413dfd2d6436c95d5c
gdb/testsuite: introduce dwarf5 option to gdb_compile

A few tests on the testsuite require dwarf5 to work. Up until now, the
way to do this was to explicitly add the command line flag -gdwarf-5.
This isn't very portable, in case a compiler requires a different flag
to emit dwarf5.

This commit adds a new option to gdb_compile that would be able to add
the correct flag (if known) or error out in case we are unable to tell
which flag to use. It also changes the existing tests to use this
general option instead of hard coding -gdwarf-5.

Reviewed-by: Keith Seitz <keiths@redhat.com>
Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.arch/amd64-entry-value-param-dwarf5.exp
gdb/testsuite/gdb.dwarf2/dw5-rnglist-test.exp
gdb/testsuite/gdb.dwarf2/gdb-index-types-dwarf5.exp
gdb/testsuite/gdb.fortran/assumedrank.exp
gdb/testsuite/lib/gdb.exp