[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: stock gdb bug: DWARF2 with DWARF_OFFSET_SIZE == 8
From:       John Baldwin <jhb () freebsd ! org>
Date:       2010-10-26 13:39:40
Message-ID: 201010260939.40487.jhb () freebsd ! org
[Download RAW message or body]

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
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic