stock gdb bug: DWARF2 with DWARF_OFFSET_SIZE == 8

Oleksandr Tymoshenko gonzo at bluezbox.com
Tue Oct 26 00:01:47 UTC 2010


     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

Thanks.


More information about the freebsd-hackers mailing list