From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43355 invoked by alias); 13 Apr 2018 13:57:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 43340 invoked by uid 89); 13 Apr 2018 13:57:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: 9pmail.ess.barracuda.com Received: from 9pmail.ess.barracuda.com (HELO 9pmail.ess.barracuda.com) (64.235.150.225) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 13 Apr 2018 13:57:08 +0000 Received: from mipsdag02.mipstec.com (mail2.mips.com [12.201.5.32]) by mx27.ess.sfj.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=NO); Fri, 13 Apr 2018 13:57:02 +0000 Received: from [10.20.78.22] (10.20.78.22) by mipsdag02.mipstec.com (10.20.40.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1415.2; Fri, 13 Apr 2018 06:57:17 -0700 Date: Fri, 13 Apr 2018 13:57:00 -0000 From: "Maciej W. Rozycki" To: Pedro Alves CC: Andrew Burgess , Subject: Re: [PATCH 3/3] gdb/testsuite: Handle targets with lots of registers In-Reply-To: <4273f7eb-464a-3abc-fc50-b6598ed3b896@redhat.com> Message-ID: References: <4273f7eb-464a-3abc-fc50-b6598ed3b896@redhat.com> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: mipsdag02.mipstec.com (10.20.40.47) To mipsdag02.mipstec.com (10.20.40.47) X-BESS-ID: 1523627821-637137-5220-51023-1 X-BESS-VER: 2018.4-r1804121647 X-BESS-Apparent-Source-IP: 12.201.5.32 X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.191957 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-BRTS-Status:1 X-SW-Source: 2018-04/txt/msg00253.txt.bz2 On Fri, 13 Apr 2018, Pedro Alves wrote: > So I'd suggest something like this: > > set saw_registers 0 > set test "maint print registers" > gdb_test_multiple $test $test { > -re "^\[^\r\n\]+\[0-9\]+\[^\r\n\]+\[0-9\]+\[^\r\n\]+\[0-9\]+\[^\r\n\]+\[0-9\]+\[^\r\n\]+\[\r\n\]+" { > set saw_registers 1 > exp_continue > } > -re "$gdb_prompt $" { > gdb_assert $saw_registers $test > } > } > > The "saw_registers" bit ends up serving as replacement for > seeing the heading, though you can also add a pattern to > match the heading and check it in the gdb_assert instead if > you'd like. FWIW I think we should keep the heading check. Maciej