From owner-freebsd-current@FreeBSD.ORG Wed Oct 29 17:52:18 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69146337; Wed, 29 Oct 2014 17:52:18 +0000 (UTC) Received: from mail-qa0-x233.google.com (mail-qa0-x233.google.com [IPv6:2607:f8b0:400d:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E529FD42; Wed, 29 Oct 2014 17:52:17 +0000 (UTC) Received: by mail-qa0-f51.google.com with SMTP id f12so2520720qad.10 for ; Wed, 29 Oct 2014 10:52:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=ZOH5ek6+/38wz8MexZoizERnqH3XD8P6DNDvxgEJJmE=; b=z5yy7EPqhSoRCFWr/OFkbqP0io6bXYyJ/z+jR3+dMIr64D+jx9kRVJ1z2soAYNYWOl C2ZhQcZxTAxG/J3n5in0d8i46+EZjs7FodJ5EsDcfIPM4n1lNh5xQUT+sOa9hY0Lu3Gj PSDtgfXDe0CdH3iPJPFz7SXQQlBSFmubI7NqZ8vxWTnoao8aIbvHLXUvvstrd8boSo1i n0xgm9O1DxmtHTnSYrv3FbkArmssWhoY0B6YPW6Ux9KiHjRYzP5sX8zHT/6+RCGGdcMb +p0s+UKIVqFar2EQJhM47d/YIB2FTgCuzEHhidtiVeoHWIBafRx6hHmHQOaRSW8sUTRy 7CCQ== X-Received: by 10.224.74.194 with SMTP id v2mr11849458qaj.60.1414605136980; Wed, 29 Oct 2014 10:52:16 -0700 (PDT) Received: from ip-172-31-25-62.ec2.internal (ec2-54-85-57-1.compute-1.amazonaws.com. [54.85.57.1]) by mx.google.com with ESMTPSA id k5sm36722qai.45.2014.10.29.10.52.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Oct 2014 10:52:16 -0700 (PDT) Date: Wed, 29 Oct 2014 17:58:33 +0000 From: Mark Johnston To: Andriy Gapon Subject: Re: HEADS UP: Standalone kernel debug files moving out of /boot/kernel/ Message-ID: <20141029175833.GC80471@ip-172-31-25-62.ec2.internal> References: <54511184.2020600@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54511184.2020600@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: David Chisnall , FreeBSD Current , Ed Maste , Kevin Oberman X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2014 17:52:18 -0000 On Wed, Oct 29, 2014 at 12:10:44PM -0400, Andriy Gapon wrote: > On 29/10/2014 10:17, Ed Maste wrote: > > On 29 October 2014 05:05, David Chisnall wrote: > >> On 29 Oct 2014, at 03:11, Ed Maste wrote: > >> > >>> /usr/lib/debug is the standard location for standalone debug data > >>> established by GDB, and seems like a decent enough location. I'll make > >>> sure to update the man page. > >> > >> Do gdb and lldb also look in /usr/local/lib/debug? If not, it would be great if we could at least teach lldb to do this so that we can start thinking about splitting debug info into separate packages for ports (and providing it as an optional install for everything). > > > > Not yet, but it's trivial to add for at least LLDB. My end goal is > > what you describe - kernel, base system userland, and packages/ports > > can all provide standalone debug packages which will install to a > > consistent and well-known location, and be picked up automatically by > > the debugger. > > > > Part of this project depends on moving past our old binutils though, > > so we can start using the build-id ELF note to link the executable or > > library with its associated debug data. > > Another part of the issue is DTrace tools that need to look for userland > symbols. A while ago I wrote some code for libproc to handle .gnu_debuglink and read stripped sections out of the standalone debug file. It seemed to me though that that kind of functionality really belongs somewhere more central, maybe in libelf. I'm not really sure what the interface should look like; I haven't seen any other libraries that handle external debug files, aside from bfd. Also note that DTrace doesn't strictly need userland symbols to work. The pid provider is a lot more useful if they're available though.