From owner-freebsd-current@freebsd.org Tue Sep 22 14:24:17 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 5A1EFA06DC9 for ; Tue, 22 Sep 2015 14:24:17 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2121214EF for ; Tue, 22 Sep 2015 14:24:17 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by iofh134 with SMTP id h134so16197035iof.0 for ; Tue, 22 Sep 2015 07:24:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:message-id:subject:to:content-type; bh=5/ToIjcIZqqQ7gUaeH18SNN5ZUIzZ41fjhUmFrBM3DI=; b=pKWc9gA3euoB9lNr82x0EetsmnBdFrvIkJMez5N29UNdj3ywYWsVVteBV02vyDzf3U WKLKOhLsmNw4auz2tAont2w3M7qdPP1Hc7eLNExgcyye4CsJWS7/lO7Ei4NhgveXYcKv duWkVojmxWiaEFpMW91hHn+ifdk6lPmTdamHQnLp3BheEVYG/umuxpROA8+y/54vdKc4 Qxp1SVBiHUnFvCHVoqF6cAnrGnZSlyUPUJ4aNc4z6adrT60OdKJrYHAl6lKOc/G4A2j8 jocYYjHtCbguA6geMBivumU9QX13sh9Qm4MBfleBcGfr47vwTDKWc+9vUIi5/yjLcVI0 yOTA== X-Received: by 10.107.137.92 with SMTP id l89mr30454165iod.38.1442931856503; Tue, 22 Sep 2015 07:24:16 -0700 (PDT) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.158.75 with HTTP; Tue, 22 Sep 2015 07:23:56 -0700 (PDT) From: Ed Maste Date: Tue, 22 Sep 2015 10:23:56 -0400 X-Google-Sender-Auth: DCOoGD3i8cLwKUQOqy8PuXMAb4k Message-ID: Subject: HEADS UP: Standalone kernel debug files moving out of /boot/kernel (really, this time) To: FreeBSD Current Content-Type: text/plain; charset=UTF-8 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: Tue, 22 Sep 2015 14:24:17 -0000 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. [1] https://lists.freebsd.org/pipermail/freebsd-current/2014-October/052926.html