[binutils-gdb] Remove two "unsupported" tests from gdb.dwarf2/imported-unit.exp

Tom Tromey tromey@sourceware.org
Tue Jan 6 17:12:14 GMT 2026


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=7b4d1374452f7e2847def3e54f409fb6e096e707

commit 7b4d1374452f7e2847def3e54f409fb6e096e707
Author: Tom Tromey <tom@tromey.com>
Date:   Sun Nov 30 15:04:04 2025 -0700

    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:
---
 gdb/testsuite/gdb.dwarf2/imported-unit.exp | 36 ------------------------------
 gdb/testsuite/lib/gdb.exp                  | 18 ---------------
 2 files changed, 54 deletions(-)

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 "<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"
 
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 } {


More information about the Gdb-cvs mailing list