diff options
author | Tom Tromey <tom@tromey.com> | 2023-12-06 14:24:08 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2024-01-18 08:20:17 -0700 |
commit | d2cc8bd228bfbd649200f909ef69c0b02a375f77 (patch) | |
tree | bdd309886c25c696b231bb46b13efcb441cd97be /gdb/testsuite/gdb.dwarf2 | |
parent | 3a862152958a1d17742cef7fc43c4d51dd2dcbab (diff) | |
download | gdb-d2cc8bd228bfbd649200f909ef69c0b02a375f77.zip gdb-d2cc8bd228bfbd649200f909ef69c0b02a375f77.tar.gz gdb-d2cc8bd228bfbd649200f909ef69c0b02a375f77.tar.bz2 |
Fix dw2-zero-range.exp when an index is in use
dw2-zero-range.exp looks for a certain complaint, but this won't be
issued when an index is in use. This patch changes the test to not
fail in this case.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2')
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp index 811d356..79ccd62 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-zero-range.exp @@ -132,7 +132,10 @@ foreach_with_prefix ranges_sect {ranges rnglists} { } } - gdb_assert { $have_complaint } $test + # The complaint won't be seen if an index is in use. + if {[have_index $lib1] == ""} { + gdb_assert { $have_complaint } $test + } } if { ! $readnow_p } { @@ -149,7 +152,10 @@ foreach_with_prefix ranges_sect {ranges rnglists} { gdb_load $lib1 set test "Zero address complaint - unrelocated - psymtab" set have_complaint [regexp $re.* $gdb_file_cmd_msg] - gdb_assert { $have_complaint } $test + # The complaint won't be seen if an index is in use. + if {[have_index $lib1] == ""} { + gdb_assert { $have_complaint } $test + } } gdb_test_no_output "maint set dwarf synchronous off" |