* python/lib/gdb/types.py (deep_items): Rename from deepitems.
authorPaul Koning <pkoning@equallogic.com>
Fri, 28 Oct 2011 14:48:38 +0000 (14:48 +0000)
committerPaul Koning <pkoning@equallogic.com>
Fri, 28 Oct 2011 14:48:38 +0000 (14:48 +0000)
* NEWS: Mention deep_items.

gdb/ChangeLog
gdb/NEWS
gdb/python/lib/gdb/types.py

index 9f44d03..af51f56 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-28  Paul Koning  <paul_koning@dell.com>
+
+       * python/lib/gdb/types.py (deep_items): Rename from deepitems.
+       * NEWS: Mention deep_items.
+
 2011-10-28  Alen Skondro  <askondro@gmail.com>
 
        * ser-tcp.c [USE_WIN32API] (ETIMEOUT): Don't define if already
index 5cdb63e..973ed0b 100644 (file)
--- a/gdb/NEWS
+++ b/gdb/NEWS
   ** A new event "gdb.new_objfile" has been added, triggered by loading a
      new object file.
 
+  ** A new function, "deep_items" has been added to the gdb.types
+     module in the GDB Python modules library.  This function returns
+     an iterator over the fields of a struct or union type.  Unlike
+     the standard Python "iteritems" method, it will recursively traverse
+     any anonymous fields.
+
 * libthread-db-search-path now supports two special values: $sdir and $pdir.
   $sdir specifies the default system locations of shared libraries.
   $pdir specifies the directory where the libpthread used by the application
index 9a9b245..c0aa422 100644 (file)
@@ -91,7 +91,7 @@ def make_enum_dict(enum_type):
     return enum_dict
 
 
-def deepitems (type_):
+def deep_items (type_):
     """Return an iterator that recursively traverses anonymous fields.
 
     Arguments:
@@ -107,5 +107,5 @@ def deepitems (type_):
         if k:
             yield k, v
         else:
-            for i in deepitems (v.type):
+            for i in deep_items (v.type):
                 yield i