On Tue, 2015-09-22 at 10:23 -0400, Ed Maste wrote:
> I am preparing to move the standalone kernel debug data out of
> /boot/kernel/ into /usr/lib/debug/boot/kernel/, mirroring the
> approach
> used for userland debug data. This significantly reduces the boot
> partition size requirement, and is a step towards supporting the
> installation of kernel debug data ony when required. LLDB and GDB
> automatically search for debug data under /usr/lib/debug/ so this
> change should be transparent from an end-user perspective.
> The change can be reviewed in Phabricator at
> https://reviews.freebsd.org/D1006 and can be fetched as a unified
> diff
> from https://people.freebsd.org/~emaste/patches/D1006.diff
> This change was discussed on -current last year[1] and a number of
> concerns were raised. These are addressed in the updated patch, and
> I'll summarize them here:
> * /usr/lib seems like an odd location for this data
> /usr/lib/debug is the standard location established by GDB, and seems
> reasonable enough. I don't want to introduce gratuitous differences
> when compared with other systems.
> * Do gdb / lldb look also in /usr/local/lib/debug, for ports debug
> files?
> Not yet; this is definitely something to address with additional
> work.
> * Is it possible to keep the current behaviour?
> Yes, set KERN_DEBUGDIR="" in src.conf(5).
> * /usr now needs to be mounted for savecore to work
> Savecore does not rely on debug files; crashinfo does. As crashinfo
> also requires /usr/bin/gdb /usr already needs to be mounted.
> * This makes working with multiple kernels more difficult.
> Users with a workflow requiring a single "cp" or "mv" to shuffle
> around kernels and debug data can use the src.conf(5) setting to keep
> things as today. The techniques documented in build(7) for working
> with multiple named kernels require no changes; for example a kernel
> in /boot/newkernel/ will have its debug data in
> /usr/lib/debug/boot/newkernel/. The kernel to kernel.old rotation
> also
> works on both /boot/kernel and /usr/lib/debug/boot/kernel.
> * Why rename .symbols to .debug?
> 1) This is what they're called elsewhere.
> 2) It's not an accurate description of the file's content. Some
> symbol
> data also exists in the binary or library, and there is a lot more
> debugging information in the standalone debug file than just symbols.
> 3) Userland and kernel debug data will have the same debug extension.
> Renaming them along with the other changes is a better approach than
> having another change later on.
> I plan to commit the change later this week.

Yay, thanks!

Rui Paulo

freebsd-current@freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"

Reply via email to