Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jul 2001 14:26:41 -0700 (PDT)
From:      John Polstra <jdp@polstra.com>
To:        hackers@freebsd.org
Cc:        sheldonh@starjuice.net
Subject:   Re: Why objcopy --strip-debug instead of strip?
Message-ID:  <200107292126.f6TLQfa15379@vashon.polstra.com>
In-Reply-To: <82186.996427489@axl.seasidesoftware.co.za>
References:  <82186.996427489@axl.seasidesoftware.co.za>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <82186.996427489@axl.seasidesoftware.co.za>,
Sheldon Hearn  <sheldonh@starjuice.net> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107292126.f6TLQfa15379>