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: [committed][gdb/testsuite] Fix gdb.base/maint.exp on powerpc64le
Date: Wed, 11 May 2022 11:14:46 +0200	[thread overview]
Message-ID: <20220511091443.GA25428@delia> (raw)

Hi,

On powerpc64le-linux, I ran into:
...
FAIL: gdb.base/maint.exp: maint print objfiles: symtabs
...

The problem is that:
- the "Cooked index in use" line occurs twice in the gdb output:
  - once for exec maint, and
  - once for "Object file system-supplied DSO".
- the matching of the second "Cooked index in use" also consumes
  the "Symtabs:" string, and consequently the corresponding
  clause does not trigger and $symtabs remains 0.

Fix this by limiting the output of the command to the exec.

Tested on x86_64-linux and powerpcle-linux.

Committed to trunk.

Thanks,
- Tom

[gdb/testsuite] Fix gdb.base/maint.exp on powerpc64le

---
 gdb/testsuite/gdb.base/maint.exp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 45ccdc6584e..2817c6eafb9 100644
--- a/gdb/testsuite/gdb.base/maint.exp
+++ b/gdb/testsuite/gdb.base/maint.exp
@@ -226,7 +226,9 @@ set header 0
 set psymtabs 0
 set cooked_index 0
 set symtabs 0
-gdb_test_multiple "maint print objfiles" "" -lbl {
+set cmd "maint print objfiles"
+set re "maint"
+gdb_test_multiple "$cmd $re" "$cmd" -lbl {
     -re "\r\nObject file.*maint($EXEEXT)?:  Objfile at ${hex}" {
 	set header 1
 	exp_continue

                 reply	other threads:[~2022-05-11  9:14 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=20220511091443.GA25428@delia \
    --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).