From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12161 invoked by alias); 7 Jan 2003 02:09:05 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12154 invoked from network); 7 Jan 2003 02:09:04 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by 209.249.29.67 with SMTP; 7 Jan 2003 02:09:04 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h071fHB03071 for ; Mon, 6 Jan 2003 20:41:17 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h0728on27850; Mon, 6 Jan 2003 21:08:51 -0500 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id h0728jn02877; Mon, 6 Jan 2003 18:08:45 -0800 Message-ID: <3E1A36AD.78DAFA63@redhat.com> Date: Tue, 07 Jan 2003 02:09:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Elena Zannoni CC: Daniel Jacobowitz , gdb-patches@sources.redhat.com Subject: Re: [RFA/PATCH] breakpoint.c: fix until command References: <3E14A019.4A600913@redhat.com> <15892.41806.882466.952438@localhost.redhat.com> <15892.54871.381942.260248@localhost.redhat.com> <3E14EB0A.15D7724E@redhat.com> <20030103015102.GA8209@nevyn.them.org> <3E14F768.DA13CB07@redhat.com> <15893.40776.758960.171190@localhost.redhat.com> <3E1621FF.A822AD5C@redhat.com> <15894.9086.849437.238762@localhost.redhat.com> <3E162537.63F529DF@redhat.com> <20030104015356.GA23728@nevyn.them.org> <15897.65265.595543.449396@localhost.redhat.com> <3E1A2CE3.9325A6F@redhat.com> <15898.12832.906305.726378@localhost.redhat.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00258.txt.bz2 Elena Zannoni wrote: > > Michael Snyder writes: > > Elena Zannoni wrote: > > > > > > Daniel Jacobowitz writes: > > > > On Fri, Jan 03, 2003 at 04:05:11PM -0800, Michael Snyder wrote: > > > > > Well then... > > > > > 1) Use find_pc_partial_function to determine bounds and > > > > > distinguish between in-bounds and out-of-bounds locations. > > > > > 2) For func_start > loc >= func_end, use a frame-relative bp. > > > > > 3) For func_start == loc or loc < func_start or loc > func_end, > > > > > use a frameless bp. > > > > > 4) document, document, document! > > > > > Including the recursive corner case. > > > > > > > > > > Agreed, Elena? > > > > > > > > So you're saying: > > > > - if the PC is in this function, only stop when this frame reaches it. > > > > > > yes > > > > > > > - if the PC is the _beginning_ of a function (what about prologue > > > > skipping, does that come into this? I don't remember if > > > > decode_line_1 will skip the prologue, but I think it will.) or in > > > > some other function, stop in any frame. > > > > > > yes, but every time I think about this, I can find an example for > > > which we get in trouble. Another case that comes to mind is until > > > 0x12345 where the address is in the prologue of the same function. > > > What to do in this case. > > > > We've got to draw a line in the sand. ;-) > > Making "until factorial" an exception is a big enough concession. > > I don't think the user can expect to do "until some-address-in-the-prologue" > > and expect it to have a special meaning. > > > > My suggestion remains: > > if func_start > location >= func_end then frame_relative. > > > > > > > > > Daniel? Michael? > > > > > > > > I'd be happier if those two behaviors had different names, but the > > > > logical name I'd give to both of them is "until", so I guess we'll just > > > > have to live with this. (3) is meaningful when inside the function > > > > too, and with this scheme there's no way to express that without using > > > > breakpoints; but I think that's a small loss. > > > > > > > > > > Actually I start to believe that we need 2 separate commands. One > > > would do the current behavior the other would be w/o frame check. We > > > already have 'jump' (and it means something different). Maybe 'goto'? > > > I can't think of a decent name. 'reach', 'get to'? > > > > run-to? > > I like the idea of restricting "until" to the current function, > > and using a separate command for locations outside the current function. > > (or inside, if you want the effect of a temporary breakpoint). > > This would remove the ambiguity. > > I think that if we can find a decent name, there is more agreement > towards separating the behaviors. Except that 'run' in gdb means start > from the beginning, so runto can be ambiguous (it is also used in the > testsuite a lot with the meaning of start over). Ah, that's right. I was thinking of that usage, but I forgot that it starts from the beginning. Doesn't the testsuite also have a similar command that means "set a breakpoint here and continue till you get there"?