From patchwork Wed Nov 15 20:11:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Baldwin X-Patchwork-Id: 24267 Received: (qmail 116643 invoked by alias); 15 Nov 2017 20:11:54 -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 116632 invoked by uid 89); 15 Nov 2017 20:11:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KB_WAM_FROM_NAME_SINGLEWORD, SPF_HELO_PASS, SPF_SOFTFAIL autolearn=ham version=3.3.2 spammy=Hx-languages-length:2533 X-HELO: mail.baldwin.cx Received: from bigwig.baldwin.cx (HELO mail.baldwin.cx) (96.47.65.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 15 Nov 2017 20:11:52 +0000 Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 9C51A10A8BE; Wed, 15 Nov 2017 15:11:49 -0500 (EST) From: John Baldwin To: Yao Qi Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v3] Add a 'starti' command. Date: Wed, 15 Nov 2017 12:11:27 -0800 Message-ID: <1615021.krJEU3LQPO@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.1-STABLE; KDE/4.14.30; amd64; ; ) In-Reply-To: <86inerwm8t.fsf@gmail.com> References: <20170911220803.73819-1-jhb@FreeBSD.org> <86inerwm8t.fsf@gmail.com> MIME-Version: 1.0 X-IsSubscribed: yes On Friday, November 03, 2017 01:00:18 PM Yao Qi wrote: > John Baldwin writes: > > > +# Continue to the start of main(). The constructor should have run so > > +# 'x' should be 1. > > + > > +gdb_breakpoint main > > +gdb_test_sequence "continue" "" { > > + "\\$2 = 1" > > + ".*Breakpoint .*main \\(\\) at .*starti.c.*" > > Here is a test failure, captured by buildbot, > https://sourceware.org/ml/gdb-testers/2017-q3/msg04381.html > > (gdb) gdb_expect_list pattern: /\$2 = 1/ > continue^M > Continuing.^M > $2 = 1^M > gdb_expect_list pattern: /.*Breakpoint .*main \(\) at .*starti.c.*/ > ^M > Breakpoint 1, Python Exception Installation error: gdb.execute_unwinders function is missing: ^M > main () at /home/yao/SourceCode/gnu/gdb/git/gdb/testsuite/gdb.base/starti.c:29^M > 29 return 0;^M > (gdb) gdb_expect_list pattern: // > FAIL: gdb.base/starti.exp: continue (pattern 3 + sentinel) (timeout) > > Can you take a look? Hmm, so it seems the python exception adds a newline which throws the regex match off as 'main \(\)' is now on a second line. The 'start.exp' test only looks for the 'main' bit and not the preceding 'Breakpoint', so something like this instead? commit ec4df1376eee46840faa5857ed6fb497df2e7a69 Author: John Baldwin Date: Wed Nov 15 12:08:13 2017 -0800 Relax final regex in starti.exp test. Python exceptions from unwinders can interrupt the output between 'Breakpoint ' and the function name, so use a simpler regex that only looks for the function name and filename similar to the regex used in start.exp. gdb/testsuite/ChangeLog: * gdb.base/starti.exp ("continue" test): Loosen regex. diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index bb8dd7923d..601b43cde2 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2017-11-15 John Baldwin + + * gdb.base/starti.exp ("continue" test): Loosen regex. + 2017-11-15 Simon Marchi * gdb.tui/completionn.exp (test_tab_completion): Add space in diff --git a/gdb/testsuite/gdb.base/starti.exp b/gdb/testsuite/gdb.base/starti.exp index 98167ce5c7..78d092e5fd 100644 --- a/gdb/testsuite/gdb.base/starti.exp +++ b/gdb/testsuite/gdb.base/starti.exp @@ -47,5 +47,5 @@ gdb_test_sequence "" "starti" { gdb_breakpoint main gdb_test_sequence "continue" "" { "\\$2 = 1" - ".*Breakpoint .*main \\(\\) at .*starti.c.*" + "main \\(\\) at .*starti.c.*" }