public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* identify static fields with the python api
@ 2015-11-30  8:52 Paul Marquess
  0 siblings, 0 replies; only message in thread
From: Paul Marquess @ 2015-11-30  8:52 UTC (permalink / raw)
  To: gdb

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-11-30  8:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-30  8:52 identify static fields with the python api Paul Marquess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).