Debug still in kernel

Frank Steinborn steinex at
Sat Mar 6 22:47:01 UTC 2010

Tim Judd wrote:
> > makeoptions     DEBUG=-g                # Build kernel with gdb(1) debug
> > symbols
> > options         PREEMPTION              # Enable kernel thread preemption
> >
> > why are these still in GENERIC after release?
> I can confirm debug symbols is still in the kernel, but that is most
> likely used for backtraces and debugging when a kernel panic happens.
> This is instead of asking the user who had a kernel panic to rebuild
> with debugging to debug it.

It creates a 'kernel.debug' compiled with -g as well as a normal
kernel. You can use 'make install.debug' to install the debug kernel.
It doesn't have any impact on the normal kernel at all.
> PREEMPTION as I understand it should have been removed from the kernel
> config file.  It should have been removed from the GENERIC config file
> after RELENG_8_0_RELEASE tag is made.  I don't know what your tag is
> when you update.  Perhaps you're copying or using a config file from
> the BETA or RC days?

PREEMPTION has nothing to do with debugging at all. It allows threads
that are in the kernel to be preempted by higher priority threads. It
helps with interactivity and allows interrupt threads to run sooner
rather than waiting.

See /usr/src/sys/conf/NOTES


More information about the freebsd-questions mailing list