]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove two "unsupported" tests from gdb.dwarf2/imported-unit.exp
authorTom Tromey <tom@tromey.com>
Sun, 30 Nov 2025 22:04:04 +0000 (15:04 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 6 Jan 2026 17:10:23 +0000 (10:10 -0700)
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.

gdb/testsuite/gdb.dwarf2/imported-unit.exp
gdb/testsuite/lib/gdb.exp

index cb05379396055e49bb334e11b049ef194f3fb42a..1be9f30a7d997eaf2324acdd372225b6eacc242b 100644 (file)
@@ -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 "<artificial>" 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"
 
index f672605ab5c9a3d9b6eff6a6aab8ee311845c0f9..bee758962a64ec9aefbcffa4705f387013ed6ca6 100644 (file)
@@ -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 } {