[RFA] Re: Python: add field access by name and standard python mapping methods to gdb.Type
Paul Koning
paulkoning@comcast.net
Tue Oct 4 15:30:00 GMT 2011
On Oct 4, 2011, at 11:13 AM, Tom Tromey wrote:
>>>>>> "Paul" == Paul Koning <paulkoning@comcast.net> writes:
>
> Paul> Thanks. Committed with these changelogs, same diff as previously mailed:
>
> Paul> * doc/gdb.texinfo (gdb.Type): Document field access by dictionary
> Paul> key syntax.
>
> For future reference, there is a separate ChangeLog in doc. Entries for
> documentation have to go there.
I overlooked that file. Thanks for the reference. Should I move the entry there?
>
> Paul> 2011-09-28 Paul Koning <paul_koning@dell.com>
> Paul> * gdb.python/py-type.c (enum E): New.
> Paul> * gdb.python/py-type.exp (test_fields): Add tests for Python
> Paul> mapping access to fields.
> Paul> (test_enums): New test for field access on enums.
>
> Could you write a NEWS entry for this change?
How about this?
paul
2011-10-04 Paul Koning <paul_koning@dell.com>
* NEWS: Add entry for Python gdb.Type mapping methods.
Index: NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.453
diff -u -r1.453 NEWS
--- NEWS 15 Sep 2011 12:27:18 -0000 1.453
+++ NEWS 4 Oct 2011 15:28:44 -0000
@@ -41,6 +41,11 @@
** The "gdb.breakpoint" function has been deprecated in favor of
"gdb.breakpoints".
+ ** Type objects for struct and union types now allow access to
+ the fields using standard Python dictionary (mapping) methods.
+ For example, "some_type['myfield']" now works, as does
+ "some_type.items()".
+
* 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
More information about the Gdb-patches
mailing list