Related articles |
---|
C structure analyzer ("Reflection" in C?) phollingsworth@sbsintl.com (1999-07-19) |
Re: C structure analyzer ("Reflection" in C?) jsgray@acm.org.nospam (Jan Gray) (1999-07-20) |
Re: C structure analyzer ("Reflection" in C?) pmai@acm.org (1999-07-21) |
Re: C structure analyzer ("Reflection" in C?) kst@cts.com (Keith Thompson) (1999-07-23) |
Re: C structure analyzer ("Reflection" in C?) jerry.pendergraft@endocardial.com (Jerry Pendergraft) (1999-07-28) |
Re: C structure analyzer ("Reflection" in C?) norbert@dune.gia.rwth-aachen.de (Norbert Berzen) (1999-07-30) |
Re: C structure analyzer ("Reflection" in C?) kst@cts.com (Keith Thompson) (1999-07-30) |
Re: C structure analyzer ("Reflection" in C?) dibyendu@mazumdar.demon.co.uk (Dibyendu Majumdar) (1999-07-30) |
Re: C structure analyzer ("Reflection" in C?) denne@aps.rwth-aachen.de (Volker Denneberg) (1999-07-30) |
Re: C structure analyzer ("Reflection" in C?) atrn@zeta.org.au (1999-08-01) |
From: | Jerry Pendergraft <jerry.pendergraft@endocardial.com> |
Newsgroups: | comp.compilers |
Date: | 28 Jul 1999 01:47:14 -0400 |
Organization: | Endocardial Systems, Inc. |
References: | 99-07-063 99-07-103 |
Keywords: | tools, analysis |
Keith Thompson wrote:
>
> > Does anybody know of a tool that I could use that converts the C
> > structure definitions into some other source file that has each data
> > member name, byte offset, size etc so that I could make a program to
> > dynamically compose these "structures"?
>
> Once upon a time, I wrote such a tool. (No, sorry, it's not
Me too, (not available either). But there are several things which
make this a very difficult job in addition to the parsing problems
mentioned by others.
The actual layout of a structure is largely up to the specific compiler,
for such things as alignment, which in turn is controlled by
#pragma pack n
All of this makes the output you would get VERRRY non portable anyway
even from one compile run to the next. I would suggens taking another
look at exactly what you need this information for and see if there is
not another way than spelunking the source.
--
Jerry Pendergraft
jerry.pendergraft@endocardial.com
Endocardial Solutions voice: 651-523-6935
1350 Energy Lane, Suite 110 fax: 651-644-7897
St Paul, MN 55108-5254
Return to the
comp.compilers page.
Search the
comp.compilers archives again.