Use bitpos and type to lookup a gdb.Field object when its name is 'None'.
authorSiva Chandra <sivachandra@chromium.org>
Fri, 27 Dec 2013 20:20:59 +0000 (12:20 -0800)
committerSiva Chandra <sivachandra@chromium.org>
Tue, 14 Jan 2014 01:35:56 +0000 (17:35 -0800)
commitb5b08fb4ffa53ec088f8ad865bee0fd6edb2906f
tree6235384f2a58a63987bc6d661390350c178730fa
parent13aaf454542c1028a033ac836d7a0d47c63a7029
Use bitpos and type to lookup a gdb.Field object when its name is 'None'.

PR python/15464
PR python/16113
* valops.c (value_struct_elt_bitpos): New function
* py-type.c (convert_field): Set 'name' attribute of a gdb.Field
object to 'None' if the field name is an empty string ("").
* python/py-value.c (valpy_getitem): Use 'bitpos' and 'type'
attribute to look for a field when 'name' is 'None'.
(get_field_type): New function

testsuite/
* gdb.python/py-type.c: Enhance test case.
* gdb.python/py-value-cc.cc: Likewise
* gdb.python/py-type.exp: Add new tests.
* gdb.python/py-value-cc.exp: Likewise
gdb/ChangeLog
gdb/python/py-type.c
gdb/python/py-value.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-type.c
gdb/testsuite/gdb.python/py-type.exp
gdb/testsuite/gdb.python/py-value-cc.cc
gdb/testsuite/gdb.python/py-value-cc.exp
gdb/valops.c
gdb/value.h
This page took 0.024826 seconds and 4 git commands to generate.