Change the default handling for kernels built with debugging info (DEBUG=-g).
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 20 Oct 2004 23:03:05 +0000 (23:03 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 20 Oct 2004 23:03:05 +0000 (23:03 +0000)
commitc2c83759541972610fd1dd0764e61b103596f42e
tree617c16cba5b9a6f4cec7fba3ef8350dd47094550
parent05498f570ee3e2d99d73bcace644585bb756ce77
Change the default handling for kernels built with debugging info (DEBUG=-g).
Since GENERIC includes this make option, this applies to most kernels.

Previously, installed kernels were stripped of their debug information and
installed modules were not.  With this commit, the debug info is left intact
in the installed kernel and debug information is stripped from all backup
copies that are made (kernel.old, modules.old).  Developers using DEBUG=-g
(which is most) may actually see root disk space go down due to the stripping
of kernel.old and modules.old (-~30MB), even though /kernel will be +~13MB
larger.

Two new makeoptions are available for specification in your kernel config or
when you run the buildkernel/nativekernel/installkernel target to make.

INSTALLSTRIPPED=1

    The installed kernel and modules will be stripped of debug info.  This
    option effectively reverts you to the pre-commit state of things.

INSTALLSTRIPPEDMODULES=1

    The installed modules will be stripped of debug info.  The kernel will
    be left with debug info intact.

What this means is that developres will no longer have to stuff a debug
kernel off somewhere to use later instead of a crash, savecore will copy
a debuggable kernel into /var/crash instead of a stripped kernel, and
snapshot and release CD's will have debug kernels and working crash dumps
right out of the box.  The memory impact of the debug kernel is zero since
the debug info is not loaded, and the run-time impact of this change is
also zero.

The intention is multi-fold:

    * To make it easier for inexperienced users to provide meaningful debug
      info to developers when posting bug reports, especially during release
      cycles.

    * To not have to make copies of debug kernels for debugging purposes.
      Such copies often get out of sync with the actually running kernel
      and savecore does not know about them.

    * To make the debugging environment more uniform, less confusing, and
      easier to use.
Makefile.inc1
sys/conf/Makefile.i386
sys/conf/kmod.mk
sys/config/LINT
sys/i386/conf/LINT