stock gdb bug: DWARF2 with DWARF_OFFSET_SIZE == 8
John Baldwin
jhb at freebsd.org
Tue Oct 26 13:46:07 UTC 2010
On Monday, October 25, 2010 7:39:17 pm Oleksandr Tymoshenko wrote:
> gdb on MIP64 does not read DWARF2 line information correctly if
> gcc was configured with DWARF_OFFSET_SIZE == 8.
>
> .debug_line starts with total length field which could be 12 bytes
> long or 4 bytes long. If it starts with 0xffffffff - it's 12 bytes
> long. Depending on its size one of the following field is either 8
> bytes or 4 bytes. This one-line patch fixes this issue for MIPS64
> but I'm not 100% sure that it doesn't break something else. So
> I'd appreciate input of someone with better grip on ELF/DWARF
> stuff then me.
>
> Patch:
> http://people.freebsd.org/~gonzo/patches/mips64gdb.diff
I looked at GDB 6.6's source and it does pass in &cu->header instead of NULL
at the same place, so I think your fix is correct.
--
John Baldwin
More information about the freebsd-hackers
mailing list