aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPaul Koning <pkoning@equallogic.com>2011-10-28 14:48:38 +0000
committerPaul Koning <pkoning@equallogic.com>2011-10-28 14:48:38 +0000
commit03c3051af409283414a7d14e7a7f596da7aa54de (patch)
treef2b469deed3e078fabdc3fe45e99bcd47858f005 /gdb
parente8b9f50888378c3b742fe435da4bd7c99ab20d42 (diff)
downloadgdb-03c3051af409283414a7d14e7a7f596da7aa54de.zip
gdb-03c3051af409283414a7d14e7a7f596da7aa54de.tar.gz
gdb-03c3051af409283414a7d14e7a7f596da7aa54de.tar.bz2
* python/lib/gdb/types.py (deep_items): Rename from deepitems.
* NEWS: Mention deep_items.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/NEWS6
-rw-r--r--gdb/python/lib/gdb/types.py4
3 files changed, 13 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9f44d03..af51f56 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/NEWS b/gdb/NEWS
index 5cdb63e..973ed0b 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -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
diff --git a/gdb/python/lib/gdb/types.py b/gdb/python/lib/gdb/types.py
index 9a9b245..c0aa422 100644
--- a/gdb/python/lib/gdb/types.py
+++ b/gdb/python/lib/gdb/types.py
@@ -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