public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] [gdb/testsuite] Fix valgrind tests on debian
Date: Tue, 26 Mar 2024 16:32:15 +0000 (GMT)	[thread overview]
Message-ID: <20240326163215.270ED3858CDA@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=eecab42fb33fcb888fbfdbf457a98a2231fd491e

commit eecab42fb33fcb888fbfdbf457a98a2231fd491e
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Mar 26 17:32:09 2024 +0100

    [gdb/testsuite] Fix valgrind tests on debian
    
    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.
    
    Approved-By: Tom Tromey <tom@tromey.com>

Diff:
---
 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,

                 reply	other threads:[~2024-03-26 16:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20240326163215.270ED3858CDA@sourceware.org \
    --to=vries@sourceware.org \
    --cc=gdb-cvs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).