Bug 191930 - Bring kernel debug files into line with userland standalone debug
Summary: Bring kernel debug files into line with userland standalone debug
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: Ed Maste
URL:
Keywords:
Depends on: 191920
Blocks: 231027
  Show dependency treegraph
 
Reported: 2014-07-17 20:06 UTC by Ed Maste
Modified: 2018-08-30 20:19 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Maste freebsd_committer freebsd_triage 2014-07-17 20:06:14 UTC
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
Comment 1 Ed Maste freebsd_committer freebsd_triage 2015-11-24 16:53:57 UTC
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
Comment 2 Ed Maste freebsd_committer freebsd_triage 2018-08-30 16:49:46 UTC
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.