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

RFA: improve documentation for block iteration


This needs a doc review.

As pointed out on the gdb@ list, we don't explicitly document that a
gdb.Block is iterable.  This patch rectifies the omission.

Tom

2012-02-21  Tom Tromey  <tromey@redhat.com>

	* gdb.texinfo (Blocks In Python): Clarify block iteration.

Index: gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.923
diff -u -r1.923 gdb.texinfo
--- gdb.texinfo	17 Feb 2012 19:52:33 -0000	1.923
+++ gdb.texinfo	21 Feb 2012 19:27:35 -0000
@@ -23848,6 +23848,9 @@
 detailed technical information on @value{GDBN}'s book-keeping of the
 stack.
 
+A @code{gdb.Block} is iterable.  The iterator returns the symbols
+@pxref{Symbols In Python} local to the block.
+
 The following block-related functions are available in the @code{gdb}
 module:
 
@@ -23866,9 +23869,8 @@
 @code{False} if not.  A block object can become invalid if the block it
 refers to doesn't exist anymore in the inferior.  All other
 @code{gdb.Block} methods will throw an exception if it is invalid at
-the time the method is called.  This method is also made available to
-the Python iterator object that @code{gdb.Block} provides in an iteration
-context and via the Python @code{iter} built-in function.
+the time the method is called.  The block's validity is also checked
+during iteration over symbols of the block.
 @end defun
 @end table
 


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