Re: GDB 7.2 + python: how to get members of anonymous structure?

Joachim Protze <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
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
smime.p7s (application/pkcs7-signature, 5.2 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.