From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30224 invoked by alias); 25 May 2007 17:59:12 -0000 Received: (qmail 30216 invoked by uid 22791); 25 May 2007 17:59:11 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 25 May 2007 17:59:09 +0000 Received: (qmail 30732 invoked from network); 25 May 2007 17:32:26 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 25 May 2007 17:32:26 -0000 To: gdb-patches@sourceware.org Subject: RFA: Document @-frame variable objects From: Jim Blandy Date: Fri, 25 May 2007 17:59:00 -0000 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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 X-SW-Source: 2007-05/txt/msg00397.txt.bz2 Could the MI folks also read this over for accuracy? gdb/doc/ChangeLog: 2007-05-25 Jim Blandy * gdb.texinfo (GDB/MI Variable Objects): Document @-frame variable objects. Index: gdb/doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.405 diff -u -r1.405 gdb.texinfo --- gdb/doc/gdb.texinfo 16 May 2007 14:16:32 -0000 1.405 +++ gdb/doc/gdb.texinfo 25 May 2007 17:31:14 -0000 @@ -19250,7 +19250,7 @@ @smallexample -var-create @{@var{name} | "-"@} - @{@var{frame-addr} | "*"@} @var{expression} + @{@var{frame-addr} | "*" | "@@"@} @var{expression} @end smallexample This operation creates a variable object, which allows the monitoring of @@ -19263,12 +19263,33 @@ unique provided that one does not specify @var{name} on that format. The command fails if a duplicate name is found. -The frame under which the expression should be evaluated can be -specified by @var{frame-addr}. A @samp{*} indicates that the current -frame should be used. +The second argument indicates the scope in which GDB should evaluate +@var{expression}: +@itemize @bullet +@item +If it is @var{frame-addr}, then GDB finds a frame at that address in +the current stack, and evaluates @var{expression} in that frame's +scope. When the frame is eventually popped, the variable object is +marked out of scope. + +@item +If it is @samp{*}, then GDB evaluates @var{expression} in the scope of +the frame selected at the time the @code{-var-create} command is +given. When the frame is eventually popped, the variable object is +marked out of scope. + +@item +If it is @samp{@@}, then the expression has no fixed scope: GDB +evaluates @var{expression} in the currently selected frame, and future +@code{-var-update} commands will use whatever frame is selected when +they are invoked. Variable objects of this sort may go in and out of +scope as the program runs, and their type may change from one update +to the next. + +@end itemize -@var{expression} is any expression valid on the current language set (must not -begin with a @samp{*}), or one of the following: +@var{expression} is any expression valid on the current language set +(although it must not begin with a @samp{*}), or one of the following: @itemize @bullet @item