From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15311 invoked by alias); 3 Jan 2003 17:51:01 -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 15287 invoked from network); 3 Jan 2003 17:51:00 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by 209.249.29.67 with SMTP; 3 Jan 2003 17:51:00 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h03HNSB05095 for ; Fri, 3 Jan 2003 12:23:28 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h03Homa27502; Fri, 3 Jan 2003 12:50:48 -0500 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h03Hokm32494; Fri, 3 Jan 2003 12:50:46 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id E4EA1FF79; Fri, 3 Jan 2003 12:55:10 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15893.52862.873251.653003@localhost.redhat.com> Date: Fri, 03 Jan 2003 17:51:00 -0000 To: Michael Elizabeth Chastain Cc: ezannoni@redhat.com, msnyder@redhat.com, drow@mvista.com, gdb-patches@sources.redhat.com Subject: Re: [RFA/PATCH] breakpoint.c: fix until command In-Reply-To: <200301031707.h03H78515685@duracef.shout.net> References: <200301031707.h03H78515685@duracef.shout.net> X-SW-Source: 2003-01/txt/msg00071.txt.bz2 Michael Elizabeth Chastain writes: > My proposal for the behavior matrix is: > > until: > continue until any source line > the current source line is reached, > in the current stack frame, or the current stack frame pops, > whichever comes first. > > until LOCATION: > a. LOCATION is in current function: continue until $PC == LINE > in the current stack frame, or the current stack frame pops, > whichever comes first. > b. LOCATION not in current function: error > this is essentially what it does now. But instead of erroring out it stops at the exit from the current frame. Because we cannot reliably distinguish a. from b. Roughly, your error is equivalent to exiting the frame. > In the 'until LOCATION' case, I guess it's okay for the user to be on > line 70 and ask to continue 'until line 65'. The user is expecting > the program to get to line 65 and they are probably right. > there could be a loop, and they may want to go back to the top, so yes. > I don't want to say "for every command line, choose some behavior and > implement it". That leads to a bunch of quirky non-orthogonal commands. > I want to say "for everything we can imagine the user doing, > provide one simple way to do it." In Elena's matrix: > > until funcname: > d. funcname called from current frame (2) --> continue until func is reached > e. funcname not called from current frame --> cont until current frame pops. > > There is already a way to do almost exactly this in gdb: > > tbreak funcname > finish > > If we had a user-accessible 'mbreak' command for momentary breakpoints, > then this would be identical: > > mbreak funcname > finish > > Judging by the November thread, most people really want to have > 'until LOCATION' always do something, even when LOCATION is not in Yes, some people agreed it would be more convenient to have 'until' do something different from what it does currently (back to what it did in 4.18). Independently of that, we all agree now that the 2 behaviors are incompatible. So either we define another command, or leave the world as is (but fix the doco and the testsuite). > the current frame. I really think it should give an error > in that case. > > Michael C