[binutils-gdb] [gdb/testsuite] Fix gdb.base/msym-lang.exp on ppc64-linux
Tom de Vries via Gdb-cvs <[email protected]> Mon, 3 Aug 2026 08:20:15 +0000 (GMT)
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D5c78aef60cb4= 9014bdc4881a6b7e3d1d4525aa26 commit 5c78aef60cb49014bdc4881a6b7e3d1d4525aa26 Author: Tom de Vries <[email protected]> Date: Mon Aug 3 10:20:04 2026 +0200 [gdb/testsuite] Fix gdb.base/msym-lang.exp on ppc64-linux =20 On x86_64-linux, with test-case gdb.base/msym-lang.exp we get: ... (gdb) info func foo All functions matching regular expression "foo": =20 Non-debugging symbols: 0x0000000000401116 foo() 0x000000000040112c foo() (gdb) PASS: $exp: info func foo ... =20 But on ppc64-linux, we get: ... (gdb) info func foo All functions matching regular expression "foo": =20 Non-debugging symbols: 0x0000000000000914 .foo() 0x0000000000000974 .foo() (gdb) FAIL: $exp: info func foo ... =20 The dot prefix is due to the function descriptors used in the PPC v1 AB= I. =20 Fix this by allowing the dot prefix. =20 Tested on x86_64-linux and ppc64-linux. =20 Approved-By: Kevin Buettner <[email protected]> Diff: --- 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 } =20 -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"]