public inbox for
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Fix gdb.base/maint.exp on powerpc64le
@ 2022-05-11  9:14 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2022-05-11  9:14 UTC (permalink / raw)
  To: gdb-cvs;h=4d88ae0c7b58ca3fc8125c0f573264de21647886

commit 4d88ae0c7b58ca3fc8125c0f573264de21647886
Author: Tom de Vries <>
Date:   Wed May 11 11:14:18 2022 +0200

    [gdb/testsuite] Fix gdb.base/maint.exp on powerpc64le
    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.

 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-11  9:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11  9:14 [binutils-gdb] [gdb/testsuite] Fix gdb.base/maint.exp on powerpc64le Tom de Vries

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).