[ECOS] How to stop gcc padding structs???

Grant Edwards grante@visi.com
Mon Jan 29 09:53:00 GMT 2001

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

More information about the Ecos-discuss mailing list