This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: -fpack-struct problems with gdb 5.3
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Matthew J Fletcher <mfletcher at serck-controls dot co dot uk>
- Cc: gdb at sources dot redhat dot com
- Date: Mon, 30 Jun 2003 09:14:41 -0400
- Subject: Re: -fpack-struct problems with gdb 5.3
- References: <200306301246.07761.mfletcher@serck-controls.co.uk>
On Mon, Jun 30, 2003 at 12:46:07PM +0100, Matthew J Fletcher wrote:
> Hi,
>
> i am using the gcc -fpack-struct flag with gcc2.96-82mdk to pack all
> structures (needed to for some asm routines). the problem being
> is that gdb-5.3 does not correctly recognise the structs as packed and
> so displayes them as if they were not, (viewing the memory region shows
> what it should look like).
>
> so may i ask can gdb view packed structs ?, is there a way to tell from the
> ELF mapfile or any other objdump information that the compiler has poorly
> generated the debug info ?
>
> or is there any way to investigate this further myself.
GCC up until 3.2.3 or so (I think) did not generate correct debuging
info for packed structures. GDB can't work out the layout on its own;
it just trusts what it is told.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer