This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

On Oct 4, 2011, at 11:13 AM, Tom Tromey wrote:

>>>>>> "Paul" == Paul Koning <> 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> 	* 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?


2011-10-04  Paul Koning  <>

	* 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
+  ** 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]