From: Tom Tromey Date: Sun, 30 Nov 2025 22:04:04 +0000 (-0700) Subject: Remove two "unsupported" tests from gdb.dwarf2/imported-unit.exp X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b4d1374452f7e2847def3e54f409fb6e096e707;p=thirdparty%2Fbinutils-gdb.git Remove two "unsupported" tests from gdb.dwarf2/imported-unit.exp gdb.dwarf2/imported-unit.exp yields two "unsupported" results but then carries on. These tests look for psymtabs, which haven't been used by the DWARF reader since the introduction of the cooked index. This patch removes these tests and also the supporting function psymtabs_p, which is no longer used. --- diff --git a/gdb/testsuite/gdb.dwarf2/imported-unit.exp b/gdb/testsuite/gdb.dwarf2/imported-unit.exp index cb053793960..1be9f30a7d9 100644 --- a/gdb/testsuite/gdb.dwarf2/imported-unit.exp +++ b/gdb/testsuite/gdb.dwarf2/imported-unit.exp @@ -130,42 +130,6 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ gdb_test_no_output "set language c++" -set psymtabs_p [psymtabs_p] - -# Verify that the partial symtab for CU "" does -# not contain the static partial symbol int, which is defined in the -# CU "imported_unit.c". Test-case for PR25646. -set test "no static partial symbols in importing unit" -if { $psymtabs_p } { - gdb_test "main print psymbols" \ - [multi_line \ - " Depends on 0 other partial symtabs\." \ - " Global partial symbols:" \ - " `main', function, $hex" \ - "" \ - ".*"] \ - $test -} else { - unsupported $test -} - -# Verify that there's only one partial symtab for imported_unit.c. Test-case -# for PR25700. -set test "no duplicate psymtab for imported_unit.c" -if { $psymtabs_p } { - set line "Partial symtab for source file imported_unit.c" - gdb_test_multiple "maint print psymbols" $test { - -re -wrap "$line.*$line.*" { - fail $gdb_test_name - } - -re -wrap "$line.*" { - pass $gdb_test_name - } - } -} else { - unsupported $test -} - gdb_test "l imported_unit.c:1" \ "warning: 1\timported_unit.c: No such file or directory" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index f672605ab5c..bee758962a6 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -10553,24 +10553,6 @@ proc have_index { objfile } { } } -# Return 1 if partial symbols are available. Otherwise, return 0. - -proc psymtabs_p { } { - global gdb_prompt - - set cmd "maint info psymtab" - gdb_test_multiple $cmd "" { - -re "$cmd\r\n$gdb_prompt $" { - return 0 - } - -re -wrap "" { - return 1 - } - } - - return 0 -} - # Verify that partial symtab expansion for $filename has state $readin. proc verify_psymtab_expanded { filename readin } {