Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] [gdb/testsuite] Fix valgrind tests on debian
@ 2024-03-26  8:01 Tom de Vries
  2024-03-26 15:28 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Tom de Vries @ 2024-03-26  8:01 UTC (permalink / raw)
  To: gdb-patches

On debian 12, I run into:
...
(gdb) target remote | vgdb --wait=2 --max-invoke-ms=2500 --pid=618591^M
Remote debugging using | vgdb --wait=2 --max-invoke-ms=2500 --pid=618591^M
relaying data between gdb and process 618591^M
warning: remote target does not support file transfer, \
  attempting to access files from local filesystem.^M
Reading symbols from /lib/ld-linux-aarch64.so.1...^M
(No debugging symbols found in /lib/ld-linux-aarch64.so.1)^M
0x000000000401a980 in ?? () from /lib/ld-linux-aarch64.so.1^M
(gdb) FAIL: gdb.base/valgrind-infcall.exp: target remote for vgdb
...

The problem is that we're expecting to match either of these regexps:
...
	set start_re1 " in \\.?_start "
        set start_re2 "\\.?_start \\(\\) at "
...
but there are no dwarf or elf symbols present.

Fix this by also allowing:
...
       set start_re3 "$::hex in \\?\\? \\(\\) from "
...

Tested on aarch64-linux.
---
 gdb/testsuite/lib/valgrind.exp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/lib/valgrind.exp b/gdb/testsuite/lib/valgrind.exp
index 2f2d58844f4..c952e929bae 100644
--- a/gdb/testsuite/lib/valgrind.exp
+++ b/gdb/testsuite/lib/valgrind.exp
@@ -94,7 +94,8 @@ proc vgdb_start { {active_at_startup 1} } {
     if { $active_at_startup } {
 	set start_re1 " in \\.?_start "
 	set start_re2 "\\.?_start \\(\\) at "
-	gdb_test "$vgdbcmd" "($start_re1|$start_re2).*" \
+	set start_re3 "$::hex in \\?\\? \\(\\) from "
+	gdb_test "$vgdbcmd" "($start_re1|$start_re2|$start_re3).*" \
 	    "target remote for vgdb"
     } else {
 	# Let $binfile run a bit before attaching.  This is a bit of a hack,

base-commit: 874f4887f0361e953f7098459ae60a5f894d362a
-- 
2.35.3


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

* Re: [PATCH] [gdb/testsuite] Fix valgrind tests on debian
  2024-03-26  8:01 [PATCH] [gdb/testsuite] Fix valgrind tests on debian Tom de Vries
@ 2024-03-26 15:28 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2024-03-26 15:28 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> warning: remote target does not support file transfer, \
Tom>   attempting to access files from local filesystem.^M

I guess we could 'set sysroot /' to avoid this.

Tom> Fix this by also allowing:
Tom> ...
Tom>        set start_re3 "$::hex in \\?\\? \\(\\) from "
Tom> ...

Seems reasonable to me.
Approved-By: Tom Tromey <tom@tromey.com>

Tom

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

end of thread, other threads:[~2024-03-26 15:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-26  8:01 [PATCH] [gdb/testsuite] Fix valgrind tests on debian Tom de Vries
2024-03-26 15:28 ` Tom Tromey

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