From patchwork Tue Jun 12 15:15:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 27753 Received: (qmail 31653 invoked by alias); 12 Jun 2018 15:15:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 31595 invoked by uid 89); 12 Jun 2018 15:15:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Jun 2018 15:15:03 +0000 Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id CD52FABE6 for ; Tue, 12 Jun 2018 15:15:00 +0000 (UTC) Date: Tue, 12 Jun 2018 17:15:00 +0200 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH, testsuite] Allow function arguments in bp print match in selftest_setup Message-ID: <20180612151500.xgw27odexd5fgyww@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170912 (1.9.0) X-IsSubscribed: yes Hi, atm selftest.exp fails for me. One of the reasons is that setting the breakpoint on captured_main and running to it gives us: ... Breakpoint 1, captured_main (data=data@entry=0x7fffffffdb80) at main.c:1144 ... while the matching in selftest_setup only allows '()', like this: ... Breakpoint 1, captured_main () at main.c:1144 ... The patch fixes this by allowing for random strings inbetween the parentheses. Tested selftest.exp (with two other selftest.exp related fixes applied). OK for trunk? Thanks, - Tom [gdb] Allow function arguments in bp print match in selftest_setup 2018-06-12 Tom de Vries * lib/selftest-support.exp (selftest_setup): Allow function arguments in matching of breakpoint printing. --- gdb/testsuite/lib/selftest-support.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/lib/selftest-support.exp b/gdb/testsuite/lib/selftest-support.exp index f7169e0955..0542861e78 100644 --- a/gdb/testsuite/lib/selftest-support.exp +++ b/gdb/testsuite/lib/selftest-support.exp @@ -88,10 +88,10 @@ proc selftest_setup { executable function } { set description "run until breakpoint at $function" gdb_test_multiple "run $INTERNAL_GDBFLAGS" "$description" { - -re "Starting program.*Breakpoint \[0-9\]+,.*$function \\(\\).* at .*main.c:.*$gdb_prompt $" { + -re "Starting program.*Breakpoint \[0-9\]+,.*$function \\(.*\\).* at .*main.c:.*$gdb_prompt $" { pass "$description" } - -re "Starting program.*Breakpoint \[0-9\]+,.*$function \\(\\).*$gdb_prompt $" { + -re "Starting program.*Breakpoint \[0-9\]+,.*$function \\(.*\\).*$gdb_prompt $" { xfail "$description (line numbers scrambled?)" } -re "Starting program.*Breakpoint \[0-9\]+,.* at .*main.c:.*$function.*$gdb_prompt $" {