PR python/13327
authorPaul Koning <pkoning@equallogic.com>
Tue, 25 Oct 2011 18:35:19 +0000 (18:35 +0000)
committerPaul Koning <pkoning@equallogic.com>
Tue, 25 Oct 2011 18:35:19 +0000 (18:35 +0000)
* gdb.texinfo (Values From Inferior): Add is_lazy attribute,
fetch_lazy method.

gdb/doc/ChangeLog
gdb/doc/gdb.texinfo

index 9169d8e..5b38a67 100644 (file)
@@ -1,3 +1,10 @@
+2011-10-25  Paul Koning  <paul_koning@dell.com>
+
+       PR python/13327
+       
+       * gdb.texinfo (Values From Inferior): Add is_lazy attribute,
+       fetch_lazy method.
+
 2011-10-20  Phil Muldoon  <pmuldoon@redhat.com>
 
        PR python/12656
index 69e2bda..853692c 100644 (file)
@@ -21681,6 +21681,21 @@ that includes @acronym{RTTI} for the object in question.  Otherwise,
 it will just return the static type of the value as in @kbd{ptype foo}
 (@pxref{Symbols, ptype}).
 @end defvar
+
+@defvar Value.is_lazy
+The value of this read-only boolean attribute is @code{True} if this
+@code{gdb.Value} has not yet been fetched from the inferior.  
+@value{GDBN} does not fetch values until necessary, for efficiency.  
+For example:
+
+@smallexample
+myval = gdb.parse_and_eval ('somevar')
+@end smallexample
+
+The value of @code{somevar} is not fetched at this time.  It will be 
+fetched when the value is needed, or when the @code{fetch_lazy}
+method is invoked.  
+@end defvar
 @end table
 
 The following methods are provided:
@@ -21814,6 +21829,19 @@ fetched and encoded to the length of characters specified.  If
 the @var{length} argument is not provided, the string will be fetched
 and encoded until a null of appropriate width is found.
 @end defun
+
+@defun Value.fetch_lazy ()
+If the @code{gdb.Value} object is currently a lazy value 
+(@code{gdb.Value.is_lazy} is @code{True}), then the value is
+fetched from the inferior.  Any errors that occur in the process
+will produce a Python exception.
+
+If the @code{gdb.Value} object is not a lazy value, this method
+has no effect.
+
+This method does not return a value.
+@end defun
+
 @end table
 
 @node Types In Python