Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] PowerPC fix for gdb.server/sysroot.exp
@ 2022-05-05 22:09 Carl Love via Gdb-patches
  2022-05-06 20:17 ` Kevin Buettner via Gdb-patches
  0 siblings, 1 reply; 2+ messages in thread
From: Carl Love via Gdb-patches @ 2022-05-05 22:09 UTC (permalink / raw)
  To: gdb-patches; +Cc: Rogerio Alves

GDB maintainers:

The gdb.server/sysroot.exp test has one failure on PowerPC.  When gdb
stops at the printf in the test, the output on PowerPC is not identical
to other systems.  The output include a little more information on the
version of GLIBC.  The result is the current gdb test fails.  

The following patch makes a minor change to the test so that the output
for PowerPC and other architectures both pass.

Intel and PowerPC both pass this test now.

Please let me know if this patch is acceptable for mainline.  Thanks.

                            Carl Love



-----------------------------------------------
PowerPC fix for gdb.server/sysroot.exp

On PowerPC, the stop in the printf function is of the form:

Breakpoint 2, 0x00007ffff7c6ab08 in printf@@GLIBC_2.17 () from /lib64/libc.so.6

On other architectures the output looks like:

Breakpoint 2, 0x0000007fb7ea29ac in printf () from /lib/aarch64-linux-gnu/libc.so.6

The following patch modifies the printf test by matchine any character
starting immediately after the printf.  The test now works for PowerPC
output as well as the output from other architectures.

The test has been run on a Power 10 system and and Intel x86_64 system.
---
 gdb/testsuite/gdb.server/sysroot.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.server/sysroot.exp b/gdb/testsuite/gdb.server/sysroot.exp
index a319200e8d2..95679fc0849 100644
--- a/gdb/testsuite/gdb.server/sysroot.exp
+++ b/gdb/testsuite/gdb.server/sysroot.exp
@@ -78,7 +78,7 @@ foreach_with_prefix sysroot { "local" "remote" } {
 
 	# Test that we can stop inside a library.
 	gdb_breakpoint printf
-	gdb_test "continue" "Breakpoint $decimal.* (__)?printf .*" \
+	gdb_test "continue" "Breakpoint $decimal.* (__)?printf.*" \
 	    "continue to printf"
     }
 }
-- 
2.31.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-06 20:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-05 22:09 [PATCH] PowerPC fix for gdb.server/sysroot.exp Carl Love via Gdb-patches
2022-05-06 20:17 ` Kevin Buettner via Gdb-patches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox