Date: Tue, 26 Oct 2010 09:39:40 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-hackers@freebsd.org Cc: Oleksandr Tymoshenko <gonzo@bluezbox.com> Subject: Re: stock gdb bug: DWARF2 with DWARF_OFFSET_SIZE == 8 Message-ID: <201010260939.40487.jhb@freebsd.org> In-Reply-To: <4CC61525.2020500@bluezbox.com> References: <4CC61525.2020500@bluezbox.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010260939.40487.jhb>