From owner-freebsd-arch@FreeBSD.ORG Wed Jun 23 04:30:34 2010 Return-Path: Delivered-To: arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64E141065670; Wed, 23 Jun 2010 04:30:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id C271A8FC0C; Wed, 23 Jun 2010 04:30:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o5N4RjZj055480; Tue, 22 Jun 2010 22:27:45 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 22 Jun 2010 22:27:53 -0600 (MDT) Message-Id: <20100622.222753.575506241433872327.imp@bsdimp.com> To: gcooper@FreeBSD.org From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: arch@FreeBSD.org, adrian@FreeBSD.org Subject: Re: Time to stop stripping binaries? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2010 04:30:34 -0000 In message: Garrett Cooper writes: : On Tue, Jun 22, 2010 at 5:08 PM, Adrian Chadd wr= ote: : > On 23 June 2010 02:09, Garrett Cooper wrote: : > : >>> ISTR someone pointing out that there's a "magical" (ie, I don't : >>> understand it) way to optionally have debugging symbols as extra : >>> file(s), rather than having to ship extremely large shared librar= ies : >>> by default. : >> : >> =A0 =A0See this link: : >> http://old.nabble.com/-gcc--separate-debug-infos-td21591416.html .= : >> It's similar to what I've seen some internal groups do before in t= he : >> past. : > : > People-who-know-the-build-system-well, how hard would it be to buil= d : > libraries with this option? : > : > People-who-know-binutils-and-gdb-and-relevant-libraries-well, what : > magic needs to happen to teach programs about this? (eg gdb, gprof,= : > pmcstat, etc?) : = : Speaking only for gdb, it's trivial from a user perspective to : pick up the debug symbols: : = : add-symbol-file : = : where is 0 for the application. : IIRC there are modifications that people have made to gdb to pick= : up debug symbols for libraries, but I'm a bit hazy here. I think this is an orthogonal issue to what I'm trying to accomplish. What is being suggested is a wholesale change in how we build to pass along -g everywhere. While this has its merits, it isn't what I'm proposing. The debug symbols here are much more extensive than the simple 'don't strip' that I'm suggesting. Those symbols are just the globals that ld puts into the binary. It gives us a amount of information at a cheap cost, both in terms of implementation complexity and in terms of extra disk space. The debug info that's being proposed here is not that cheap, and quite extensive. That's why it is segregated to another file. This might be worth doing as well, but is quite a different beast. Warner