From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22486 invoked by alias); 22 May 2013 14:32:46 -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 22382 invoked by uid 89); 22 May 2013 14:32:46 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 22 May 2013 14:32:45 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UfA5q-0005W7-M5 from Yao_Qi@mentor.com ; Wed, 22 May 2013 07:32:42 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 22 May 2013 07:32:42 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.2.247.3; Wed, 22 May 2013 07:32:41 -0700 Message-ID: <519CD71E.1060402@codesourcery.com> Date: Wed, 22 May 2013 14:32:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Pedro Alves CC: Subject: Re: [PATCH 5/5] range stepping: tests References: <20130514191026.13213.39574.stgit@brno.lan> <20130514191102.13213.74060.stgit@brno.lan> In-Reply-To: <20130514191102.13213.74060.stgit@brno.lan> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-SW-Source: 2013-05/txt/msg00836.txt.bz2 On 05/15/2013 03:11 AM, Pedro Alves wrote: Pedro, the tests look good to me overall. Some nits below, > + > + /* Generate a range that includes a loop in it. */ Nit: "a range" is not clear, and we should mention that they must belong to a single line of source. How about this? Generate a range of instructions compiled from a single line of source that include a loop. > +#define RANGE_WITH_LOOP \ > + do \ > + { \ > + for (a = 0, e = 0; a < 15; a++) \ > + e += a; \ > + } while (0) > + > + RANGE_WITH_LOOP; > + > + RANGE_WITH_LOOP; > + > + /* Generate a range that includes a time-consuming loop. GDB breaks > + the loop early by clearing variable 'c'. */ Likewise. > + > +with_test_prefix "step over func" { > + > + set line_num [gdb_get_line_number "location 2"] > + gdb_test "where" "main \\(\\) at .*${srcfile}:${line_num}.*" > + > + # It's expected to get three stops and two 'vCont;r's. In the C > + # code, the line of C source produces roughly the following > + # instructions: > + # > + # addr1: > + # insn1 > + # insn2 > + # ... > + # call func1 > + # addr2: > + # ... > + # insn3 > + # addr3: > + # insn4 > + # > + # Something like this will happen: > + # --> vCont;rADDR1,ADDR3 (range step from ADDR1 to ADDR3) > + # <-- T05 (target single-stepped to func, which is out of the step range) > + # --> $Z0,ADDR2 (place step-resume breakpoint at ADDR2) > + # --> vCont;c (resume) > + # <-- T05 (target stops at ADDR2) > + # --> vCont;rADDR1,ADDR3 (continues range stepping) > + # <-- T05 > + exec_cmd_expect_vCont_count "next" 0 2 > +} > + > +# Check that breapoints interrupt range stepping correctly. breakpoints > + > + /* Generate a single-range line with a label in the middle where we ^^^^^^^^^^^^^^^^^ How about "a single line"? > + > +# Check that range stepping works well with tracepoints. > + > +proc range_stepping_with_tracepoint { type } { > + with_test_prefix "${type}" { > + gdb_breakpoint [gdb_get_line_number "location 1"] > + gdb_continue_to_breakpoint "location 1" > + delete_breakpoints > + > + gdb_test "${type} *set_point" ".*" > + gdb_test_no_output "tstart" > + > + # Step a line with a tracepoint in the middle. The tracepoint > + # itself shouldn't have any effect on range stepping. We > + # should see one vCont;r and no vCont;s's. ^^^^^^^^^ "vCont;s", singular form? The patch below is to skip the rest of range stepping tests if the first one fails, to avoid the issue of huge number of rsp packets in gdb.log. It is on top of your series. It works well with my stub. I've run out of time today, and I'll have a look at the rest of this series tomorrow. -- Yao (齐尧) gdb/testsuite: 2013-05-22 Yao Qi * gdb.base/range-stepping.exp: Skip the rest of tests if test fails. --- gdb/testsuite/gdb.base/range-stepping.exp | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/gdb/testsuite/gdb.base/range-stepping.exp b/gdb/testsuite/gdb.base/range-stepping.exp index def25ce..aa5d34f 100644 --- a/gdb/testsuite/gdb.base/range-stepping.exp +++ b/gdb/testsuite/gdb.base/range-stepping.exp @@ -85,6 +85,14 @@ with_test_prefix "multi insns" { set pc_after_stepping $expect_out(1,string) pass $msg } + -re ".*" { + fail $msg + # It is the first test on range-stepping, and the simplest + # one. If it fails, probably the rest of the tests fail + # and huge number of rsp packets will blow up the gdb.log + # file. Skip the rest of the tests. + return + } } # There should be at least two instructions between -- 1.7.7.6