From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8041 invoked by alias); 23 May 2013 18:03:29 -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 8030 invoked by uid 89); 23 May 2013 18:03:28 -0000 X-Spam-SWARE-Status: No, score=-8.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 23 May 2013 18:03:28 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4NI3QwQ008661 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 23 May 2013 14:03:26 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4NI3OF6030853; Thu, 23 May 2013 14:03:25 -0400 Message-ID: <519E59EB.10704@redhat.com> Date: Thu, 23 May 2013 18:03:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Yao Qi CC: gdb-patches@sourceware.org Subject: Re: [PATCH 5/5] range stepping: tests References: <20130514191026.13213.39574.stgit@brno.lan> <20130514191102.13213.74060.stgit@brno.lan> <519CD71E.1060402@codesourcery.com> In-Reply-To: <519CD71E.1060402@codesourcery.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00890.txt.bz2 On 05/22/2013 03:02 PM, Yao Qi wrote:> On 05/21/2013 02:28 AM, Pedro Alves wrote: >> I see. Thanks, that's much more detailed info than just saying "it's unsafe". >> >> I'm guessing the huge number of RSP packets comes from that big loop in the >> test: >> >> /* Generate a range that includes a loop, which is time consuming. >> Variable C is used to terminate the loop earlier when GDB >> wants. */ >> for (c = 1, a = 0; a < 65535 && c; a++) {for (b = 0; b < 65535 && c; b++) { d1 = d2 * a / b; d2 = d1 * >> >> We could skip most of the range stepping tests if e.g., the >> test that steps the short line FAILs: >> >> /* A line of source will be generated to a number of >> instructions by compiler. */ >> a = b + c + d * e - a; /* location 1 */ >> >> WDYT? > > Pedro, > That is a good idea. It works for my internal stub! I'll post a delta patch on top of yours. ... > 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. Thanks! > 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 ".*" { This should not leave the prompt in the buffer, as it may confuse the next test. But I'm not understanding how this is catching the issue. Why would "print/x \$pc" fail if the stub degenerates to implementing vCont;r as a single instruction step? > + 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. Suggest minor editing: # This is the first range-stepping test, and the simplest # one. If it fails, probably the rest of the tests would # fail too, and the huge number of rsp packets in the test with # the time-consuming loop would blow up the gdb.log file. # Skip the rest of the tests. > + return > + } > } > > # There should be at least two instructions between -- Pedro Alves