From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22798 invoked by alias); 15 Jan 2003 00:11:07 -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 22791 invoked from network); 15 Jan 2003 00:11:07 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by 209.249.29.67 with SMTP; 15 Jan 2003 00:11:07 -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 h0ENgeB32018 for ; Tue, 14 Jan 2003 18:42:40 -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 h0F0Ata22341 for ; Tue, 14 Jan 2003 19:10:55 -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 h0F0Asb20019 for ; Tue, 14 Jan 2003 19:10:55 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 6541BFF79; Tue, 14 Jan 2003 19:15:16 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15908.43028.234336.895660@localhost.redhat.com> Date: Wed, 15 Jan 2003 00:11:00 -0000 To: gdb-patches@sources.redhat.com Subject: [RFA/doc] until/advance commands X-SW-Source: 2003-01/txt/msg00546.txt.bz2 This is the patch for the new commands. Elena 2003-01-14 Elena Zannoni * gdb.texinfo (Continuing and Stepping): Add new command 'advance'. Clarify behavior of 'until'. Index: gdb.texinfo =================================================================== RCS file: /cvs/uberbaum/gdb/doc/gdb.texinfo,v retrieving revision 1.137 diff -u -p -r1.137 gdb.texinfo --- gdb.texinfo 13 Jan 2003 17:59:49 -0000 1.137 +++ gdb.texinfo 15 Jan 2003 00:10:00 -0000 @@ -3462,8 +3462,35 @@ argument. Continue running your program until either the specified location is reached, or the current stack frame returns. @var{location} is any of the forms of argument acceptable to @code{break} (@pxref{Set Breaks, -,Setting breakpoints}). This form of the command uses breakpoints, -and hence is quicker than @code{until} without an argument. +,Setting breakpoints}). This form of the command uses breakpoints, and +hence is quicker than @code{until} without an argument. The specified +location is actually reached only if it is in the current frame. This +implies that @code{until} can be used to skip over recursive function +invocations. For instance in the code below, if the current location is +line @code{96}, issuing @code{until 99} will execute the program up to +line @code{99} in the same invocation of factorial, i.e. after the inner +invocations have returned. + +@smallexample +94 int factorial (int value) +95 @{ +96 if (value > 1) @{ +97 value *= factorial (value - 1); +98 @} +99 return (value); +100 @} +@end smallexample + + +@kindex advance @var{location} +@itemx advance @var{location} +Continue running the program up to the given location. An argument is +required, anything of the same form as arguments for the @code{break} +command. Execution will also stop upon exit from the current stack +frame. This command is similar to @code{until,} but @code{advance} will +not skip over recursive function calls, and the target location doesn't +have to be in the same frame as the current one. + @kindex stepi @kindex si @r{(@code{stepi})}