This is the mail archive of the gdb@sourceware.org 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: GDB 7.2 + python: how to get members of anonymous structure?


On 06.06.2013 02:41, Gopakumar C.E wrote:
> GDB 7.2 python doesn't have gdb.Type.iteritems method. Anyway I can access the members of the anonymous structure (which is within another structure of course) from gdb 7.2 ? The assumption is that I dont know know the name of the members of the anonymous structure or else I could have done gdb.parse_and_eval on them.
>
> Rgds,
> Gopa.
You can use gdb.Type.fields() to get a list of the gdb.Field objects,
defined for the anon structure.
for gdb.Fields see:
http://sourceware.org/gdb/onlinedocs/gdb/Types-In-Python.html

gdb.Type.fields(), gdb.Field.name, gdb.Field.type are available in gdb 6.8

- Joachim

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


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