From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 66CFE395A41E; Wed, 11 May 2022 09:14:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 66CFE395A41E Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Fix gdb.base/maint.exp on powerpc64le X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 37b506d30a8e82df69b807f57ba09a2369265ea0 X-Git-Newrev: 4d88ae0c7b58ca3fc8125c0f573264de21647886 Message-Id: <20220511091423.66CFE395A41E@sourceware.org> Date: Wed, 11 May 2022 09:14:23 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2022 09:14:23 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D4d88ae0c7b58= ca3fc8125c0f573264de21647886 commit 4d88ae0c7b58ca3fc8125c0f573264de21647886 Author: Tom de Vries Date: Wed May 11 11:14:18 2022 +0200 [gdb/testsuite] Fix gdb.base/maint.exp on powerpc64le =20 On powerpc64le-linux, I ran into: ... FAIL: gdb.base/maint.exp: maint print objfiles: symtabs ... =20 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. =20 Fix this by limiting the output of the command to the exec. =20 Tested on x86_64-linux and powerpcle-linux. Diff: --- 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/main= t.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