identify static fields with the python api
Paul Marquess
Paul.Marquess@owmobility.com
Mon Nov 30 08:52:00 GMT 2015
I trying to identify the static fields in a struct/class using the Python A= PI, but I don't see anything in the API that will flag them.
Can get everything else I need from the field as shown below
for field in sometype.fields():
n =3D field.name
t =3D field.type
s =3D t.sizeof
To work around the issue I've captured the output from "ptype" with a gdb.e= xecute and checked for the static fields there. Messy (and surprisingly slo= w for bigish classes) but it does seem to work.
Is there any other way to do this?
Paul
More information about the Gdb
mailing list