This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: Document @-frame variable objects


Could the MI folks also read this over for accuracy?

gdb/doc/ChangeLog:
2007-05-25  Jim Blandy  <jimb@codesourcery.com>

	* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]