public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH][gdb/testsuite] Fix gdb.mi/mi-sym-info.exp on openSUSE Tumbleweed
Date: Wed, 28 Sep 2022 13:48:32 +0200	[thread overview]
Message-ID: <20220928114830.GA23860@delia.home> (raw)

Hi,

On openSUSE Tumbleweed, I run into:
...
FAIL: gdb.mi/mi-sym-info.exp: List all functions from debug information only
...

The problem is in matching this string:
...
{name="_start",type="void (void)",description="void _start(void);"}
...
using regexp fun_re, which requires a line field:
...
set fun_re \
    "\{line=\"$decimal\",name=${qstr},type=${qstr},description=${qstr}\}"
...

Fix this by making the line field optional in fun_re.

Tested on x86_64-linux.

Any comments?

Thanks,
- Tom

[gdb/testsuite] Fix gdb.mi/mi-sym-info.exp on openSUSE Tumbleweed

---
 gdb/testsuite/gdb.mi/mi-sym-info.exp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.mi/mi-sym-info.exp b/gdb/testsuite/gdb.mi/mi-sym-info.exp
index 7b936061759..2f723ece882 100644
--- a/gdb/testsuite/gdb.mi/mi-sym-info.exp
+++ b/gdb/testsuite/gdb.mi/mi-sym-info.exp
@@ -38,7 +38,8 @@ mi_clean_restart $binfile
 mi_runto_main
 
 set qstr "\"\[^\"\]+\""
-set fun_re "\{line=\"$decimal\",name=${qstr},type=${qstr},description=${qstr}\}"
+set fun_re \
+    "\{(?:line=\"$decimal\",)?name=${qstr},type=${qstr},description=${qstr}\}"
 set type_re "\{(?:line=\"$decimal\",)*name=${qstr}\}"
 set sym_list "\\\[${fun_re}(?:,$fun_re)*\\\]"
 set type_sym_list "\\\[${type_re}(?:,$type_re)*\\\]"

                 reply	other threads:[~2022-09-28 11:48 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=20220928114830.GA23860@delia.home \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).