This is the mail archive of the archer@sourceware.org mailing list for the Archer 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]

[python] document gdb.history


I realized we don't have any documentation for gdb.history.
This adds it.

Tom

2008-12-03  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Basic Python): Document gdb.history.

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 186ce69..bf5e3b7 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -18099,6 +18099,19 @@ If the named parameter does not exist, this function throws a
 a Python value of the appropriate type, and returned.
 @end defun
 
+@findex gdb.history
+@defun history number
+Return a value from @value{GDBN}'s value history (@pxref{Value
+History}).  @var{number} indicates which history element to return.
+If @var{number} is less than or equal to zero, then @value{GDBN} will
+take the absolute value of @var{number} and count backward from the
+last element to find the value to return.  If there is no such element
+in the value history, an exception will be raised.
+
+The return value is always an instance of @code{gdb.Value}
+(@pxref{Values From Inferior}).
+@end defun
+
 @findex gdb.parse_and_eval
 @defun parse_and_eval expression
 Parse @var{expression} as an expression in the current language,


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