This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
[python] document gdb.history
- From: Tom Tromey <tromey at redhat dot com>
- To: Project Archer <archer at sourceware dot org>
- Date: Wed, 03 Dec 2008 09:21:27 -0700
- Subject: [python] document gdb.history
- Reply-to: Tom Tromey <tromey at redhat dot com>
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,