]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: fix pattern in gdb.base/dlmopen-ns-ids.exp
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 14 Aug 2025 20:13:01 +0000 (16:13 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Fri, 22 Aug 2025 20:56:22 +0000 (16:56 -0400)
I forgot one spot when updating the "info shared" header from NS to
"Linker NS", fix that.  This fixes the following failure:

    FAIL: gdb.base/dlmopen-ns-ids.exp: check no duplicates: info sharedlibrary

At the same time, fix a couple of things I found when looking at this
code again.  One is bad indentation, the other is an unnecessary
parameter.

Change-Id: Ibbc2062699264dde08fd3ff7c503524265c73b0c

gdb/testsuite/gdb.base/dlmopen-ns-ids.exp

index 51815c397a5947a1206cf7cd9401f437f285547b..c0ce4da43b7d28ccbf1dbed31dab31698567388c 100644 (file)
@@ -46,7 +46,7 @@ if { [build_executable "failed to build" $testfile $srcfile \
 #  - namespace ID
 #  - name (file path)
 
-proc get_info_shared {{arg ""}} {
+proc get_info_shared {} {
     set from_re "($::hex)\\s+"
     set to_re "($::hex)\\s+"
     set ns_re "(?:($::decimal)\\s+)?"
@@ -54,19 +54,19 @@ proc get_info_shared {{arg ""}} {
     set name_re "(\[^\r\n\]+)"
     set libs {}
 
-    gdb_test_multiple "info sharedlibrary $arg" "" {
-       -re {From\s+To\s+(NS\s+)?Syms Read\s+Shared Object Library\r\n} {
-               exp_continue
+    gdb_test_multiple "info sharedlibrary" "" {
+       -re {From\s+To\s+(Linker NS\s+)?Syms Read\s+Shared Object Library\r\n} {
+           exp_continue
        }
 
        -re "^${from_re}${to_re}${ns_re}${syms_read_re}${name_re}\r\n" {
-               set from $expect_out(1,string)
-               set to $expect_out(2,string)
-               set ns $expect_out(3,string)
-               set name $expect_out(4,string)
+           set from $expect_out(1,string)
+           set to $expect_out(2,string)
+           set ns $expect_out(3,string)
+           set name $expect_out(4,string)
 
-               lappend libs [list $from $to $ns $name]
-               exp_continue
+           lappend libs [list $from $to $ns $name]
+           exp_continue
        }
 
        -re {^\(\*\): Shared library is missing debugging information\.\r\n} {