From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 26 13:46:07 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A94BA106566C for ; Tue, 26 Oct 2010 13:46:07 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 771E98FC13 for ; Tue, 26 Oct 2010 13:46:07 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 1F0FD46B7F; Tue, 26 Oct 2010 09:46:07 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 95E838A029; Tue, 26 Oct 2010 09:46:05 -0400 (EDT) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 26 Oct 2010 09:39:40 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100819; KDE/4.4.5; amd64; ; ) References: <4CC61525.2020500@bluezbox.com> In-Reply-To: <4CC61525.2020500@bluezbox.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201010260939.40487.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Tue, 26 Oct 2010 09:46:05 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=4.2 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Cc: Oleksandr Tymoshenko Subject: Re: stock gdb bug: DWARF2 with DWARF_OFFSET_SIZE == 8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2010 13:46:07 -0000 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