This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


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

Re: How to stop gcc padding structs???


On Mon, Jan 29, 2001 at 05:49:28PM +0000, Jonathan Larmour wrote:

> It's generally non-portable to rely on struct layout matching
> hardware, and just because gcc can be coerced to do it doesn't
> make it wise, nor guarantee it on different architectures (or
> different versions of gcc!). It is better practice to use
> accessor macros instead.
> 
> And no, I know Red Hat don't always practice what we preach,
> but we *should*.

I know, but debugging is a royal pain when GDB doesn't know
about the structure of the peripheral and you've got to work
off of hex memory dumps just like the bad old days.

-- 
Grant Edwards
grante@visi.com

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