From owner-cvs-src@FreeBSD.ORG Tue Sep 13 17:56:16 2005 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF62016A41F; Tue, 13 Sep 2005 17:56:16 +0000 (GMT) (envelope-from obrien@NUXI.com) Received: from dragon.NUXI.org (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AB2143D45; Tue, 13 Sep 2005 17:56:14 +0000 (GMT) (envelope-from obrien@NUXI.com) Received: from dragon.NUXI.org (obrien@localhost [127.0.0.1]) by dragon.NUXI.org (8.13.4/8.13.4) with ESMTP id j8DHuEtb026128; Tue, 13 Sep 2005 10:56:14 -0700 (PDT) (envelope-from obrien@dragon.NUXI.org) Received: (from obrien@localhost) by dragon.NUXI.org (8.13.4/8.13.1/Submit) id j8DHuEcj026127; Tue, 13 Sep 2005 10:56:14 -0700 (PDT) (envelope-from obrien) Date: Tue, 13 Sep 2005 10:56:13 -0700 From: "David O'Brien" To: Ruslan Ermilov Message-ID: <20050913175613.GA18137@dragon.NUXI.org> References: <20050911002229.51F4916A471@hub.freebsd.org> <432382BC.5080105@root.org> <20050911023622.GA51877@dragon.NUXI.org> <4324A665.3070405@root.org> <20050912010034.GA77819@dragon.NUXI.org> <20050913071031.GE37280@ip.net.ua> <20050913085848.GG37280@ip.net.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050913085848.GG37280@ip.net.ua> X-Operating-System: FreeBSD 7.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 User-Agent: Mutt/1.5.9i Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/conf kern.post.mk X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: obrien@FreeBSD.org List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Sep 2005 17:56:17 -0000 On Tue, Sep 13, 2005 at 11:58:48AM +0300, Ruslan Ermilov wrote: > To address all of this, I suggest to revert kern.post.mk to rev. 1.83 > and just make INSTALL_DEBUG the default in HEAD when DEBUG is also > set. Should this be also true for modules, I'm not sure. .. > The only change in behavior would be that installkernel.debug now > installs *both* normal and debug versions, while previously it only > installed debug versions. 1. We can still have the confusion of how to provide a usable traceback. The poster will have to know to kgdb kernel.debug vs. kernel. 2. Why install a file that is a complete copy of another and then extra needed information? Instead just install the fuller copy. Those suffering from small / partitions will have even more pressure installing an extra 6.7MB. Please remember the purpose of this is to get better bug reports on -CURRENT. While still trying to strike a balance with disk space and usability. Here is a patch that separates out the symbols into its own file and installs them beside the now stripped kernel executable. I've minimally tested in on i386 with 'kgdb' and 'gdb6 -k'. Index: kern.post.mk =================================================================== RCS file: /home/ncvs/src/sys/conf/kern.post.mk,v retrieving revision 1.84 diff -u -u -2 -r1.84 kern.post.mk --- kern.post.mk 11 Sep 2005 00:22:21 -0000 1.84 +++ kern.post.mk 13 Sep 2005 17:46:48 -0000 @@ -83,7 +83,7 @@ @echo linking ${.TARGET} ${SYSTEM_LD} -.if !defined(DEBUG) + ${OBJCOPY} --only-keep-debug ${.TARGET} ${.TARGET}.symbols ${OBJCOPY} --strip-debug ${.TARGET} -.endif + ${OBJCOPY} --add-gnu-debuglink=${.TARGET}.symbols ${.TARGET} ${SYSTEM_LD_TAIL} @@ -181,4 +181,10 @@ .endif +.if defined(DEBUG) && !defined(NO_INSTALL_KERNEL_SYMBOLS) +KERNEL_FILES= ${KERNEL_KO} ${KERNEL_KO}.symbols +.else +KERNEL_FILES= ${KERNEL_KO} +.endif + kernel-install: @if [ ! -f ${KERNEL_KO} ] ; then \ @@ -201,5 +207,5 @@ .endif mkdir -p ${DESTDIR}${KODIR} - ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_KO} ${DESTDIR}${KODIR} + ${INSTALL} -p -m 555 -o root -g wheel ${KERNEL_FILES} ${DESTDIR}${KODIR} kernel-reinstall: -- -- David (obrien@FreeBSD.org)