A single src.conf(5) knob, WITH_DEBUG_FILES=yes, enables userland standalone debug. Setting it enables a few things: - CFLAGS has -g added to generate debug data during compilation - Binaries and libraries are built as a .full version which includes debug - The .full file is converted into one with the debug data stripped out (no extra extension), and a separate debug data file (.debug extension) - Debug data is installed under /usr/lib/debug/... Kernel standalone debug files have a few differences: - The -g flag has to be added via the kernel config file (it is set in GENERIC) - WITHOUT_KERNEL_SYMBOLS will avoid splitting the kernel objects - Extensions are different (.debug for the full object, .symbols for the debug data) - Debug data is installed in the same directory as the kernel objects, in /boot/kernel The last point is an annoyance, as /boot may not be a very large filesystem
As of r288176 these two are addressed: - Extensions are different (.debug for the full object, .symbols for the debug data) - Debug data is installed in the same directory as the kernel objects, in /boot/kernel These two are still true today: - The -g flag has to be added via the kernel config file (it is set in GENERIC) - WITHOUT_KERNEL_SYMBOLS will avoid splitting the kernel objects
Move to 13.x tracking PR. The changes that can be made in an existing branch or in-progress release (11.x/12.x) have been done. Any additional changes to be done in -CURRENT well in advance of a release.