From owner-freebsd-hackers Sun Jul 29 14:26:52 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 7A90C37B401 for ; Sun, 29 Jul 2001 14:26:48 -0700 (PDT) (envelope-from jdp@wall.polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.11.3/8.11.1) with ESMTP id f6TLQgq51101; Sun, 29 Jul 2001 14:26:42 -0700 (PDT) (envelope-from jdp@wall.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.11.3/8.11.0) id f6TLQfa15379; Sun, 29 Jul 2001 14:26:41 -0700 (PDT) (envelope-from jdp) Date: Sun, 29 Jul 2001 14:26:41 -0700 (PDT) Message-Id: <200107292126.f6TLQfa15379@vashon.polstra.com> To: hackers@freebsd.org From: John Polstra Cc: sheldonh@starjuice.net Subject: Re: Why objcopy --strip-debug instead of strip? In-Reply-To: <82186.996427489@axl.seasidesoftware.co.za> References: <82186.996427489@axl.seasidesoftware.co.za> Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article <82186.996427489@axl.seasidesoftware.co.za>, Sheldon Hearn wrote: > > When the kernel is built as kernel.debug, why is it passed through > objcopy --strip-debug before being installed, instead of being passed > through strip? If you strip all of the symbols from the kernel then nothing that uses libkvm will work. > Background: I recently found that the Handbook instructions for > "Debugging Loadable Modules Using GDB" is mostly useless for post-mortem > crash dump analysis, because buildkernel doesn't build modules with > debugging support, even when CONFIGARGS=-g. > > The attached patch (for the i386 only) fixes this so that, if kernel.debug > is built, foo.ko.debug etc. are built. For each foo.ko.debug, we > produce foo.ko with objcopy --strip-debug and install foo.ko. > > What I'm unsure of is why it's worth going to all this trouble. > > Why not simply build all the modules with debugging support compiled in > (assuming debugging support was requested for the kernel), and strip > them at install time (install -s)? I don't understand what this has to do with how the kernel is stripped. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message