diff options
author | Guinevere Larsen <guinevere@redhat.com> | 2025-02-04 10:19:57 -0300 |
---|---|---|
committer | Guinevere Larsen <guinevere@redhat.com> | 2025-03-26 17:18:56 -0300 |
commit | 043975ad0a1c68719ae3219023a0813386f4681d (patch) | |
tree | 83bde1de9288b2df7255e7253cdc8af558e670e3 | |
parent | a8373e160b7912628ab70f97c5a336d2375480b3 (diff) | |
download | binutils-043975ad0a1c68719ae3219023a0813386f4681d.zip binutils-043975ad0a1c68719ae3219023a0813386f4681d.tar.gz binutils-043975ad0a1c68719ae3219023a0813386f4681d.tar.bz2 |
gdb/testsuite: Force DWARF debuginfo where applicable in AIX systems
In the AIX systems available for testing in the gcc compile farm, the
default debug information format is stabs. This is a problem for many
reasons, mainly that stabs is not as complete as dwarf and stabs is
being deprecated in the next release. In the current state, we have:
PASS: 39798
FAIL: 7405
When running these tests, I unfortunately didn't have the foresight to
save the number of unsupported and untested cases.
To improve testing there, this patch changes the gdb_compile TCL proc, so
that if we're running tests in AIX, we requested debug info, and we
haven't explicitly asked for some debuginfo format, gdb_compile will add
-gdwarf to the compilation line, forcing DWARF to be used. After this
patch, we get:
PASS: 74548
FAIL: 5963
So not only do we have fewer failures, there are tens of thousands of
tests that are no longer skipped.
Approved-By: Tom Tromey <tom@tromey.com>
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 8486ff0..761a4f1 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5946,6 +5946,23 @@ proc gdb_compile {source dest type options} { } } + # On AIX systems, until GCC 12 (maybe later), stabs was the default + # debug option, but we'd like to have dwarf instead. + # If we're running on one of those systems and debug was requested, + # but no explicit -g<format> option was given, use -gdwarf to force + # that as the debug info for the inferior. + # This list should be exhaustive: + set debug_format "btf|ctf|stabs|vms|coff|xcoff" + # Since additional_flags is a comma separated list, identify if there + # are other (optional) flags in the list. + set other_options "-\[a-zA-Z0-9\]*," + set full_regexp "^additional_flags=\($other_options\)*-g\($debug_format\)" + if { [istarget *-*-aix*] + && [lsearch -exact $options debug] != -1 + && [lsearch -regexp $options $full_regexp] == -1} { + lappend new_options "additional_flags=-gdwarf" + } + set shlib_found 0 set shlib_load 0 foreach opt $options { |