DWARF2 line number problem
Jim Blandy
jimb@redhat.com
Wed Aug 21 10:57:00 GMT 2002
"Martin M. Hunt" <hunt@redhat.com> writes:
> On Tuesday 20 August 2002 10:13 pm, you wrote:
> > "Martin M. Hunt" <hunt@redhat.com> writes:
> > > I have a problem and I'm not sure what the correct solution would be.
> > >
> > > I'm looking at gcc mips output. The compilation unit says pointer
> > > size is 4, but the DWARF line section is setting the address to a
> > > sign-extended 8-byte value. GDB cleverly ignores the actual size of
> > > the extended opcode and reads a 4-byte value then starts parsing the
> > > rest of the bytes as line opcodes!
> >
> > Could you compile your program with -save-temps -dA, and post the
> > assembly code?
>
> I'll send it to you if you want, but the problem is not there.
>
> The problem appears to be either GAS or GDB depending on how we
> interpret the DWARF spec.
In Dwarf 2, the size of an operand to DW_LNE_set_address is determined
by the `address_size' field of the compilation unit header. If GDB
isn't using that value, then it's a GDB bug. If GAS is putting one
size in the compilation unit header, and using a different size when
emitting line number information, then that's a GAS bug.
More information about the Gdb
mailing list