From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Edwards To: Jonathan Larmour Cc: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] How to stop gcc padding structs??? Date: Mon, 29 Jan 2001 09:53:00 -0000 Message-id: <20010129115707.A12269@visi.com> References: <20010128124058.A9989@visi.com> <3A75AD28.3F252CD3@redhat.com> X-SW-Source: 2001-01/msg00455.html 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