identify static fields with the python api
Paul Marquess <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CY1PR0501MB1178E192D2DEE7BFD26BB7B995000@CY1PR0501MB1178.namprd05.prod.outlook.com> |
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