* python/lib/gdb/types.py (deep_items): Rename from deepitems.

* NEWS: Mention deep_items.
This commit is contained in:
Paul Koning 2011-10-28 14:48:38 +00:00
parent e8b9f50888
commit 03c3051af4
3 changed files with 13 additions and 2 deletions

View 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

View File

@ -56,6 +56,12 @@
** 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

View 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