This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
[python] Documentation fixes for gdb.Frame.
- From: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- To: archer ml <archer at sourceware dot org>
- Date: Mon, 02 Mar 2009 10:28:57 -0300
- Subject: [python] Documentation fixes for gdb.Frame.
Hi,
Just committed this.
gdb/
* python/python-frame.c (gdbpy_initialize_frames): Mark comment as a
note instead of a FIXME.
gdb/doc/
* gdb.texinfo (Basic Python): Document `gdb.solib_address'.
(Frames In Python): Document `Frame.unwind_stop_reason' and
`Frame.block'. Reword documentation for `Frame.read_var_value'.
---
gdb/doc/gdb.texinfo | 20 ++++++++++++++++++--
gdb/python/python-frame.c | 2 +-
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index d055353..fef4680 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -18305,6 +18305,11 @@ which is typically four bytes. @var{max_count} is the highest number of matches
to search for.
@end defun
+@findex gdb.solib_address
+@defun solib_address @var{address}
+Return the name of the shared library holding the given address, or None.
+@end defun
+
@node Exception Handling
@subsubsection Exception Handling
@cindex python exceptions
@@ -19513,10 +19518,20 @@ Returns the type of the frame. The value can be one of
or @code{gdb.SENTINEL_FRAME}.
@end defmethod
+@defmethod Frame unwind_stop_reason
+Return an integer representing the reason why it's not possible to find
+frames older than this. Use @code{gdb.frame_stop_reason_string} to convert
+the value returned by this function to a string.
+@end defmethod
+
@defmethod Frame pc
Returns the frame's resume address.
@end defmethod
+@defmethod Frame block
+Returns the frame's code block. @c (see @xref{Block,,Code Blocks and Scopes}).
+@end defmethod
+
@defmethod Frame address_in_block
Returns an address which falls within the frame's code block.
@end defmethod
@@ -19533,8 +19548,9 @@ Return the frame immediately newer (inner) to this frame.
Return the frame's symtab and line object. @c (see @xref{Symtab_and_line,, Symtab and line}).
@end defmethod
-@defmethod Frame read_var_value @var{symbol}
-Return the value of the variable corresponding to the given symbol in this frame.
+@defmethod Frame read_var_value @var{variable}
+Return the value of the given variable in this frame. @code{variable} can be
+either a string or a @code{gdb.Symbol} object. @c (@pxref{Symbols In Python}).
@end defmethod
@end table
diff --git a/gdb/python/python-frame.c b/gdb/python/python-frame.c
index eada79f..93b7a0a 100644
--- a/gdb/python/python-frame.c
+++ b/gdb/python/python-frame.c
@@ -585,7 +585,7 @@ gdbpy_initialize_frames (void)
if (PyType_Ready (&frame_object_type) < 0)
return;
- /* FIXME: These would probably be best exposed as class attributes of Frame,
+ /* Note: These would probably be best exposed as class attributes of Frame,
but I don't know how to do it except by messing with the type's dictionary.
That seems too messy. */
PyModule_AddIntConstant (gdb_module, "NORMAL_FRAME", NORMAL_FRAME);
--
1.5.6.5