Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/2] [gdb/testsuite] Fix gdb.base/msym-lang.exp on ppc64-linux
Date: Sun,  2 Aug 2026 11:34:21 +0200	[thread overview]
Message-ID: <20260802093421.794182-3-tdevries@suse.de> (raw)
In-Reply-To: <20260802093421.794182-1-tdevries@suse.de>

On x86_64-linux, with test-case gdb.base/msym-lang.exp we get:
...
(gdb) info func foo
All functions matching regular expression "foo":

Non-debugging symbols:
0x0000000000401116  foo()
0x000000000040112c  foo()
(gdb) PASS: $exp: info func foo
...

But on ppc64-linux, we get:
...
(gdb) info func foo
All functions matching regular expression "foo":

Non-debugging symbols:
0x0000000000000914  .foo()
0x0000000000000974  .foo()
(gdb) FAIL: $exp: info func foo
...

The dot prefix is due to the function descriptors used in the PPC v1 ABI.

Fix this by allowing the dot prefix.

Tested on x86_64-linux and ppc64-linux.
---
 gdb/testsuite/gdb.base/msym-lang.exp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/msym-lang.exp b/gdb/testsuite/gdb.base/msym-lang.exp
index d0beddea417..38521e4ebf7 100644
--- a/gdb/testsuite/gdb.base/msym-lang.exp
+++ b/gdb/testsuite/gdb.base/msym-lang.exp
@@ -20,4 +20,11 @@ if {[prepare_for_testing "failed to prepare" $testfile [list $srcfile $srcfile2]
     return
 }
 
-gdb_test "info func foo" ".* foo\\(\\).* foo\\(\\).*"
+# The optional leading dot is for ppc64 v1 ABI function descriptors.
+set re_foo [quotemeta {@/[.]?/foo()}]
+
+gdb_test "info func foo" \
+    [multi_line \
+	 "Non-debugging symbols:" \
+	 "$hex  $re_foo" \
+	 "$hex  $re_foo"]
-- 
2.51.0


  parent reply	other threads:[~2026-08-02  9:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-02  9:34 [PATCH 0/2] [gdb/testsuite] Two ppc64 fixes Tom de Vries
2026-08-02  9:34 ` [PATCH 1/2] [gdb/testsuite] Fix gdb.base/examine-address-class.exp for big endian Tom de Vries
2026-08-03  4:51   ` Kevin Buettner
2026-08-03  8:20     ` Tom de Vries
2026-08-02  9:34 ` Tom de Vries [this message]
2026-08-03  4:57   ` [PATCH 2/2] [gdb/testsuite] Fix gdb.base/msym-lang.exp on ppc64-linux Kevin Buettner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260802093421.794182-3-tdevries@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox