public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* structure offset to structure name conversion.
@ 2011-10-27 19:29 James Courtier-Dutton
  2011-10-27 20:30 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: James Courtier-Dutton @ 2011-10-27 19:29 UTC (permalink / raw)
  To: gcc

Hi,

If I have a structure e.g.
struct test_s {
    int32_t var1;
    int32_t var2;
    uint64_t var3;
    int var4;
} test;

If I have an offset value of 8, I wish to do a lookup and get to:
test.var3

Is there some part of gcc that I could use to parse .h files and
produce a table for me of offset against each variable in the
structure to permit this sort of lookup?

Kind Regards

James

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-10-27 19:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-27 19:29 structure offset to structure name conversion James Courtier-Dutton
2011-10-27 20:30 ` Ian Lance Taylor
2011-10-27 21:32   ` Paul_Koning

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).