From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22976 invoked by alias); 2 Mar 2009 13:29:08 -0000 Mailing-List: contact archer-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Received: (qmail 22956 invoked by uid 22791); 2 Mar 2009 13:29:07 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_37,SPF_PASS X-Spam-Check-By: sourceware.org Subject: [python] Documentation fixes for gdb.Frame. From: Thiago Jung Bauermann To: archer ml Content-Type: text/plain Date: Mon, 02 Mar 2009 13:29:00 -0000 Message-Id: <1236000537.8949.54.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-SW-Source: 2009-q1/txt/msg00301.txt.bz2 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