This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Structure alignment problem


William A. Gatliff writes:
 > Grant:
 > 
 > On Mon, Nov 04, 2002 at 10:11:56AM -0600, Grant Edwards wrote:
 > > On Mon, Nov 04, 2002 at 04:10:03PM +0000, Yves Rutschle wrote:
 > > > On Mon, Nov 04, 2002 at 09:05:15AM -0600, Grant Edwards wrote:
 > > > > I beat my head against that one for a couple days and never
 > > > > figured it out.  I asked on the gcc mailing list and all I got
 > > > > were adminishments for trying to use structs to layout data in
 > > > > an externally defined manner.
 > > > 
 > > > How else can you do it? Sprintf everything as text? :-)
 > > 
 > > Use memcpy() to transfer data to and from an array of unsigned
 > > chars at hard-wired offsets.
 > 
 > Can you imagine having to look at code like that a year later?  :^)
 > 
 > Yep, structure-defined i/o is evil.  But the alternatives are much worse...

Do both?  As in include/elf/external.h in binutils/gdb releases?
[or am I missing the point ...]

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]