Re: [RFA] Re: Python: add field access by name and standard python mapping methods to gdb.Type

Paul Koning
2011-09-28T20:06:49Z

On Sep 28, 2011, at 1:49 PM, Doug Evans wrote:

> ...
> One changelog entry has two colons (::), but other than that
> it's ok by me. Thanks!

Thanks. Committed with these changelogs, same diff as previously mailed:

2011-09-28 Paul Koning <paul_koning@dell.com>

* python/py-type.c (make_fielditem, typy_field_names, typy_items)
(typy_length, typy_get, typy_has_key, typy_make_iter)
(typy_iterkeys, typy_iteritems, typy_itervalues, typy_iter)
(typy_iterator_iter, typy_iterator_iternext)
(typy_iterator_dealloc): New functions to implement standard
Python mapping methods on gdb.Type object.
(gdb.TypeIterator): New Python type.
* python/python-internal.h (gdbpy_iter_kind): New enum.
* doc/gdb.texinfo (gdb.Type): Document field access by dictionary
key syntax.

2011-09-28 Paul Koning <paul_koning@dell.com>

* gdb.python/py-type.c (enum E): New.
* gdb.python/py-type.exp (test_fields): Add tests for Python
mapping access to fields.
(test_enums): New test for field access on enums.

paul