From owner-freebsd-toolchain@FreeBSD.ORG Sun Jan 5 13:00:40 2014 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9670F5FD; Sun, 5 Jan 2014 13:00:40 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 523A81E05; Sun, 5 Jan 2014 13:00:40 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::3c23:d7b2:13bc:a7ca] (unknown [IPv6:2001:7b8:3a7:0:3c23:d7b2:13bc:a7ca]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 9FC755C43; Sun, 5 Jan 2014 14:00:36 +0100 (CET) Content-Type: multipart/signed; boundary="Apple-Mail=_7399F1A6-F0A0-435A-9444-93C083C2727E"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: [CFT] Update to clang 3.4 From: Dimitry Andric In-Reply-To: Date: Sun, 5 Jan 2014 14:00:03 +0100 Message-Id: <29C2D69E-9EC8-418D-A333-FC1A8DA2133B@FreeBSD.org> References: <541C998A-071A-4917-9D91-DD00CB0E2689@FreeBSD.org> To: Ed Schouten X-Mailer: Apple Mail (2.1827) Cc: freebsd-toolchain@freebsd.org X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jan 2014 13:00:40 -0000 --Apple-Mail=_7399F1A6-F0A0-435A-9444-93C083C2727E Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On 05 Jan 2014, at 13:06, Ed Schouten wrote: > 2014/1/1 Dimitry Andric : >> Another important new issue is that clang 3.4 now outputs DWARF4 as >> default format when using -g. Our ancient version of gdb in base does >> not support this, so you must either install the gdb port, or build lldb >> and use it (very experimental at this time!). > > Would it make sense to just change our copy of Clang to emit DWARF2 > when using -g? People expect that -g emits something that can be used > by our shipped version of gdb. There are multiple problems with that: first of all, it changes the upstream defaults, which I am very reluctant to do. Upstream actually wants to get rid of older DWARF support, since that makes their code needlessly complicated, and the rest of the world has long since moved on to newer DWARF versions. Even gcc defaults to DWARF4 now. Second, the shipped version of gdb in our tree is very old, and is basically unmaintained. Nobody in their right mind should ever use it for debugging, unless they have no other choice. As soon as the in-tree version of lldb is in workable state, we should get rid of the base gdb. I think the only tricky task left is our custom kgdb hacks, which must be ported to some newer version of gdb soon, or preferably to lldb. I have no idea if anybody is working on those. Last but not least, I can build a kernel with -gdwarf-2, but ctfconvert and/or ctfmerge still have some trouble correctly converting and/or merging the debug information to CTF. So there is something broken in either the DWARF2 output, or there is a problem in ctfconvert and ctfmerge. I need some assistance with this, from somebody who knows exactly how CTF and DTrace work together. Our CTF tools use libdwarf in base, which is also quite old, and seems to be largely unmaintained. It does not seem to support anything beyond DWARF2. I think it would be worthwhile to upgrade this library from upstream ASAP. -Dimitry --Apple-Mail=_7399F1A6-F0A0-435A-9444-93C083C2727E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.22 (Darwin) iEYEARECAAYFAlLJV2AACgkQsF6jCi4glqPaBwCfSspAomAXe/zZC7hPDjIBfFBb 4j8AnAhCbXFWzv2Kw9fuW9PuCCC6bnRa =j9iq -----END PGP SIGNATURE----- --Apple-Mail=_7399F1A6-F0A0-435A-9444-93C083C2727E--