From owner-freebsd-current@freebsd.org Wed Sep 23 04:59:52 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6027A0627C for ; Wed, 23 Sep 2015 04:59:52 +0000 (UTC) (envelope-from rpaulo@me.com) Received: from mr11p00im-asmtp001.me.com (mr11p00im-asmtp001.me.com [17.110.69.252]) (using TLSv1.2 with cipher DHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7DE531A9D; Wed, 23 Sep 2015 04:59:52 +0000 (UTC) (envelope-from rpaulo@me.com) Received: from akita.hsd1.ca.comcast.net (c-73-162-13-215.hsd1.ca.comcast.net [73.162.13.215]) by mr11p00im-asmtp001.me.com (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Mar 31 2015)) with ESMTPSA id <0NV400CHJ5VOBP20@mr11p00im-asmtp001.me.com>; Wed, 23 Sep 2015 04:59:51 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2015-09-23_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 kscore.is_bulkscore=1.31153671256712e-09 compositescore=0.981618935876834 phishscore=0 kscore.is_spamscore=0 rbsscore=0.981618935876834 recipient_to_sender_totalscore=0 spamscore=0 urlsuspectscore=0.981618935876834 adultscore=0 kscore.compositescore=0 circleOfTrustscore=0 suspectscore=0 recipient_domain_to_sender_totalscore=0 bulkscore=0 recipient_domain_to_sender_domain_totalscore=0 recipient_to_sender_domain_totalscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1412110000 definitions=main-1509230086 Message-id: <1442984388.24327.23.camel@me.com> Subject: Re: HEADS UP: Standalone kernel debug files moving out of /boot/kernel (really, this time) From: Rui Paulo To: Ed Maste , FreeBSD Current Date: Tue, 22 Sep 2015 21:59:48 -0700 In-reply-to: References: Content-type: text/plain; charset=UTF-8 X-Mailer: Evolution 3.16.5-1 MIME-version: 1.0 Content-transfer-encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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, 23 Sep 2015 04:59:52 -0000 On Tue, 2015-09-22 at 10:23 -0400, Ed Maste wrote: > I am preparing to move the standalone kernel debug data out of > /boot/kernel/ into /usr/lib/debug/boot/kernel/, mirroring the > approach > used for userland debug data. This significantly reduces the boot > partition size requirement, and is a step towards supporting the > installation of kernel debug data ony when required. LLDB and GDB > automatically search for debug data under /usr/lib/debug/ so this > change should be transparent from an end-user perspective. > > The change can be reviewed in Phabricator at > https://reviews.freebsd.org/D1006 and can be fetched as a unified > diff > from https://people.freebsd.org/~emaste/patches/D1006.diff > > This change was discussed on -current last year[1] and a number of > concerns were raised. These are addressed in the updated patch, and > I'll summarize them here: > > * /usr/lib seems like an odd location for this data > /usr/lib/debug is the standard location established by GDB, and seems > reasonable enough. I don't want to introduce gratuitous differences > when compared with other systems. > > * Do gdb / lldb look also in /usr/local/lib/debug, for ports debug > files? > Not yet; this is definitely something to address with additional > work. > > * Is it possible to keep the current behaviour? > Yes, set KERN_DEBUGDIR="" in src.conf(5). > > * /usr now needs to be mounted for savecore to work > Savecore does not rely on debug files; crashinfo does. As crashinfo > also requires /usr/bin/gdb /usr already needs to be mounted. > > * This makes working with multiple kernels more difficult. > Users with a workflow requiring a single "cp" or "mv" to shuffle > around kernels and debug data can use the src.conf(5) setting to keep > things as today. The techniques documented in build(7) for working > with multiple named kernels require no changes; for example a kernel > in /boot/newkernel/ will have its debug data in > /usr/lib/debug/boot/newkernel/. The kernel to kernel.old rotation > also > works on both /boot/kernel and /usr/lib/debug/boot/kernel. > > * Why rename .symbols to .debug? > 1) This is what they're called elsewhere. > 2) It's not an accurate description of the file's content. Some > symbol > data also exists in the binary or library, and there is a lot more > debugging information in the standalone debug file than just symbols. > 3) Userland and kernel debug data will have the same debug extension. > Renaming them along with the other changes is a better approach than > having another change later on. > > I plan to commit the change later this week. > Yay, thanks! -- Rui Paulo