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


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: -fpack-struct problems with gdb 5.3


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


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