From nobody@FreeBSD.ORG  Sun Jul  2 11:14:47 2000
Return-Path: <nobody@FreeBSD.ORG>
Received: by hub.freebsd.org (Postfix, from userid 32767)
	id DA77337BE15; Sun,  2 Jul 2000 11:14:47 -0700 (PDT)
Message-Id: <20000702181447.DA77337BE15@hub.freebsd.org>
Date: Sun,  2 Jul 2000 11:14:47 -0700 (PDT)
From: jblaine@mitre.org
Sender: nobody@FreeBSD.ORG
To: freebsd-gnats-submit@FreeBSD.org
Subject: handbook mentions stripping kernel.debug, but this is done for you
X-Send-Pr-Version: www-1.0

>Number:         19648
>Category:       docs
>Synopsis:       handbook mentions stripping kernel.debug, but this is done for you
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ben
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 02 11:20:00 PDT 2000
>Closed-Date:    Fri Jul 14 22:56:52 BST 2000
>Last-Modified:  Fri Jul 14 22:57:57 BST 2000
>Originator:     Jeff Blaine
>Release:        4.0-RELEASE
>Organization:
The MITRE Corporation
>Environment:
FreeBSD kickflop 4.0-RELEASE FreeBSD 4.0-RELEASE #4: Sun Jul  2 12:37:52 EDT 2000     root@kickflop:/usr/src/sys/compile/BUNK  i386
>Description:
In the section of the handbook regarding debugging kernel dumps,
the directions tell you to enable 'makeoptions DEBUG=-g' in your
/usr/src/sys/BLAH kernel config file, build the new kernel, and then
strip it.  When I built my kernel with -g, the kernel was stripped
as a final part of the make process.
>How-To-Repeat:
Build a 4.0-RELEASE kernel with 'makeoptions DEBUG=-g' and examine
the final line of the build process.
>Fix:
Remove the following paragraph from the appropriate handbook section:

=======================================================================
When the kernel has been built make a copy of it, say kernel.debug, and then run strip -g on the original. Install the original as normal. You may
also install the unstripped kernel, but symbol table lookup time for some programs will drastically increase, and since the whole kernel is loaded
entirely at boot time and cannot be swapped out later, several megabytes of physical memory will be wasted.
=======================================================================

Additionally, change the following text to refer to 'kernel' and not
'kernel.debug':

======================================================================
Now, after a crash dump, go to /sys/compile/WHATEVER and run kgdb. From kgdb do:

    symbol-file kernel.debug
    exec-file /var/crash/kernel.0
    core-file /var/crash/vmcore.0
======================================================================

>Release-Note:
>Audit-Trail:

From: Jeff Blaine <jblaine@linus.mitre.org>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: docs/19648: handbook mentions stripping kernel.debug, but this is 
 done for you
Date: Thu, 06 Jul 2000 09:59:53 -0400

 The 2nd part of this reported doc error is not a doc error at all.
 It's a manifestation of my FreeBSD ignorance.  The 1st part of this
 bug is still valid I believe.
 
 For reference the 2nd part I'm referring to is:
 
      Additionally, change the following text to refer to 'kernel'
      and not 'kernel.debug':
 
      ==============================================================
      Now, after a crash dump, go to /sys/compile/WHATEVER and run
      kgdb. From kgdb do:
 
          symbol-file kernel.debug
          exec-file /var/crash/kernel.0
          core-file /var/crash/vmcore.0
      ==============================================================
 

From: Ben Smithurst <ben@FreeBSD.org>
To: jblaine@mitre.org
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: docs/19648: handbook mentions stripping kernel.debug, but this is done for you
Date: Mon, 10 Jul 2000 21:21:54 +0100

 --WplhKdTI2c8ulnbP
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 jblaine@mitre.org wrote:
 
 > Remove the following paragraph from the appropriate handbook section:
 >
 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 > When the kernel has been built make a copy of it, say kernel.debug,
 > and then run strip -g on the original. Install the original as
 > normal. You may also install the unstripped kernel, but symbol table
 > lookup time for some programs will drastically increase, and since the
 > whole kernel is loaded entirely at boot time and cannot be swapped out
 > later, several megabytes of physical memory will be wasted.
 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 
 Then people with FreeBSD 3.x or earlier will lose that advice...  How
 about something like this instead:
 
 --- chapter.sgml        2000/06/14 00:47:36     1.24
 +++ chapter.sgml        2000/07/10 20:19:07
 @@ -48,7 +48,10 @@
         releases.</para>
      </note>
     =20
 -    <para>When the kernel has been built make a copy of it, say
 +    <para>If you are using any version of FreeBSD older than 4.0-RELEASE,
 +      you should install a stripped copy of the kernel, rather than the
 +      significantly larger debug copy.
 +      When the kernel has been built, make a copy of it, say
        <filename>kernel.debug</filename>, and then run <command>strip
         -g</command> on the original.  Install the original as normal.  You
        may also install the unstripped kernel, but symbol table lookup time=
  for
 
 Is the bit about wasting space still even true?  I thought with ELF this
 situation had improved a bit.  Anyone know?
 
 --=20
 Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D
 
 --WplhKdTI2c8ulnbP
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: PGPfreeware 5.0i for non-commercial use
 MessageID: ZCSnMwlYjEoiBfaTeicypkOsiYblncsm
 
 iQCVAwUBOWowYSsPVtiZOS99AQEFGAP+K5y9kT4mxDC6emURh5rIltKkmx0wkVah
 R5q6ezQPd1ut1pwzR8ymsIYWJ0ng9QteHblmZ92UqzepooEmCFK2BxBzrZFGADFB
 Tyc53IbPTKb4u4lF/3a88ro3G7SH6+5xb6HzNZ9xCchtDTICiROfXC5RqkIyaf8S
 HGtRgFAqUNM=
 =u7Y5
 -----END PGP SIGNATURE-----
 
 --WplhKdTI2c8ulnbP--
 

From: Ben Smithurst <ben@FreeBSD.org>
To: jblaine@mitre.org
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: docs/19648: handbook mentions stripping kernel.debug, but this is done for you
Date: Mon, 10 Jul 2000 21:38:28 +0100

 --3V7upXqbjpZ4EhLz
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Ben Smithurst wrote:
 
 > -    <para>When the kernel has been built make a copy of it, say
 > +    <para>If you are using any version of FreeBSD older than 4.0-RELEASE,
 > +      you should install a stripped copy of the kernel, rather than the
 > +      significantly larger debug copy.
 > +      When the kernel has been built, make a copy of it, say
 
 Grr.  That's not what I meant, you still use the stripped copy on 4.0,
 you just don't strip it yourself.  Something like this would actually
 make more sense:
 
 --- chapter.sgml        2000/06/14 00:47:36     1.24
 +++ chapter.sgml        2000/07/10 20:37:40
 @@ -48,9 +48,12 @@
         releases.</para>
      </note>
     =20
 -    <para>When the kernel has been built make a copy of it, say
 +    <para>When the kernel has been built, make a copy of it, say
        <filename>kernel.debug</filename>, and then run <command>strip
 -       -g</command> on the original.  Install the original as normal.  You
 +       -g</command> on the original.  Install the original as normal.
 +      Note that from FreeBSD 4.0-RELEASE onwards, these two steps are
 +      performed automatically, so you should not execute them yourself.
 +      On all FreeBSD releases, you
        may also install the unstripped kernel, but symbol table lookup time=
  for
        some programs will drastically increase, and since the whole kernel =
 is
        loaded entirely at boot time and cannot be swapped out later, several
 
 --=20
 Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D
 
 --3V7upXqbjpZ4EhLz
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: PGPfreeware 5.0i for non-commercial use
 MessageID: cmWSXIq9pIwtYO/TAjNdCsbAkMTmBwim
 
 iQCVAwUBOWo0QysPVtiZOS99AQFy5wP/TAIYG/ddNT9KBMeToec/yt22tr8No55c
 a4pr8ieuu7DzukDbkk868sS655CBcEMQf8tbU2VJ5TiR46d5sI9EaCY0GjA2/FPd
 vgoBaBvb3zaOLwzu5h0tURHbWcoe4OIG25EFvQB469MBLmSH7wqq0P0dPVwWR2o1
 Iyy1C1+cdhA=
 =Xw6F
 -----END PGP SIGNATURE-----
 
 --3V7upXqbjpZ4EhLz--
 
Responsible-Changed-From-To: freebsd-doc->ben 
Responsible-Changed-By: ben 
Responsible-Changed-When: Thu Jul 13 20:48:48 BST 2000 
Responsible-Changed-Why:  
I'm working on this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19648 
State-Changed-From-To: open->closed 
State-Changed-By: ben 
State-Changed-When: Fri Jul 14 22:56:52 BST 2000 
State-Changed-Why:  
Text updated, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=19648 
>Unformatted:
