public inbox for archer@sourceware.org
 help / color / mirror / Atom feed
* [python] Documentation fixes for gdb.Frame.
@ 2009-03-02 13:29 Thiago Jung Bauermann
  2009-03-02 16:39 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: Thiago Jung Bauermann @ 2009-03-02 13:29 UTC (permalink / raw)
  To: archer ml

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [python] Documentation fixes for gdb.Frame.
  2009-03-02 13:29 [python] Documentation fixes for gdb.Frame Thiago Jung Bauermann
@ 2009-03-02 16:39 ` Tom Tromey
  2009-03-03  2:57   ` Thiago Jung Bauermann
  0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2009-03-02 16:39 UTC (permalink / raw)
  To: Thiago Jung Bauermann; +Cc: archer ml

>>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:

Thiago> +Returns the frame's code block. @c (see @xref{Block,,Code Blocks and Scopes}).

Just FYI, I think here it is more typical to use (@pxref{...}).

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [python] Documentation fixes for gdb.Frame.
  2009-03-02 16:39 ` Tom Tromey
@ 2009-03-03  2:57   ` Thiago Jung Bauermann
  0 siblings, 0 replies; 3+ messages in thread
From: Thiago Jung Bauermann @ 2009-03-03  2:57 UTC (permalink / raw)
  To: Tom Tromey; +Cc: archer ml

El lun, 02-03-2009 a las 09:39 -0700, Tom Tromey escribió:
> >>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:
> 
> Thiago> +Returns the frame's code block. @c (see @xref{Block,,Code Blocks and Scopes}).
> 
> Just FYI, I think here it is more typical to use (@pxref{...}).

Thanks. I'll update this in my next patch do Frame docs.
-- 
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-03  2:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-02 13:29 [python] Documentation fixes for gdb.Frame Thiago Jung Bauermann
2009-03-02 16:39 ` Tom Tromey
2009-03-03  2:57   ` Thiago Jung Bauermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).