From: Paul Marquess <Paul.Marquess@owmobility.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: identify static fields with the python api
Date: Mon, 30 Nov 2015 08:52:00 -0000 [thread overview]
Message-ID: <CY1PR0501MB1178E192D2DEE7BFD26BB7B995000@CY1PR0501MB1178.namprd05.prod.outlook.com> (raw)
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
reply other threads:[~2015-11-30 8:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CY1PR0501MB1178E192D2DEE7BFD26BB7B995000@CY1PR0501MB1178.namprd05.prod.outlook.com \
--to=paul.marquess@owmobility.com \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).