From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27646 invoked by alias); 22 May 2013 14:01:59 -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 27618 invoked by uid 89); 22 May 2013 14:01:56 -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:01:56 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1Uf9c1-0002eQ-WE from Yao_Qi@mentor.com ; Wed, 22 May 2013 07:01:54 -0700 Received: from SVR-ORW-FEM-05.mgc.mentorg.com ([147.34.97.43]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 22 May 2013 07:01:53 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-05.mgc.mentorg.com (147.34.97.43) with Microsoft SMTP Server id 14.2.247.3; Wed, 22 May 2013 07:01:53 -0700 Message-ID: <519CCFE5.1030304@codesourcery.com> Date: Wed, 22 May 2013 14:01: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 6/7] range stepping: test case References: <1363006291-13334-1-git-send-email-yao@codesourcery.com> <1363006291-13334-7-git-send-email-yao@codesourcery.com> <51928327.5080803@redhat.com> <519346F0.1030507@codesourcery.com> <519A6B6A.1030107@redhat.com> In-Reply-To: <519A6B6A.1030107@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-05/txt/msg00833.txt.bz2 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. > >> >We use convince variable to avoid this problem. On the other >> >hand, I don't think it is a good idea to peek the GDB internal states by >> >checking some rsp packets and personally I prefer the way that GDB is able to expose >> >some internal states by some means (command "maint" and convince variables, for example). > I don't like using a convenience variable for this, as those are visible > to the user (show convenience). > > "maint" seems better. But I'm not certain of it. An issue I have with it > is that from the log you just see the condensed report of what happened > (sent 4 vCont;r, should have been 3), while to diagnose the issue you'll > most likely need to get more info than that ("Okay, what was really sent? > What were the ranges? Were there signals interrupting the range? Etc."). I > have a suspicion we'll end up needing to end up with "set debug infrun 1" > on, and look at that too for some of the trickier cases, and end up with > different number of expected ranges depending on target on some cases. > > The actual difference between v1 -> v2 wrt to the RSP packets vs > convenience var was surprisingly smaller than I anticipated. So how > about we go with RSP first, and see how things go from there? I agree. -- Yao (齐尧)