| Summary: | handbook mentions stripping kernel.debug, but this is done for you | ||
|---|---|---|---|
| Product: | Documentation | Reporter: | jblaine <jblaine> |
| Component: | Books & Articles | Assignee: | ben <ben> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
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
==============================================================
jblaine@mitre.org wrote: > 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. > ====================================================================== 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> - <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? -- Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D 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> - <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 -- Ben Smithurst / ben@FreeBSD.org / PGP: 0x99392F7D Responsible Changed From-To: freebsd-doc->ben I'm working on this one. State Changed From-To: open->closed Text updated, thanks! |
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. 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 ====================================================================== How-To-Repeat: Build a 4.0-RELEASE kernel with 'makeoptions DEBUG=-g' and examine the final line of the build process.