HomeFreeBSD

Use -fdebug-prefix-map to map auto-generated kernel build paths.

Description

Use -fdebug-prefix-map to map auto-generated kernel build paths.

The kernel build uses symlinks to make MD #includes like <machine/pcpu.h>
work. Debug info ends up referencing these symlinks in a relative path,
so debuggers generally don't know how to find the corresponding headers.
Address this by using -fdebug-prefix-map to map relative paths through
the symlinks to their absolute paths in the source tree. This is
consistent with how regular source file paths are defined in the
kernel's debug info.

Also map the current directory to an absolute path to the object
directory. This gives debuggers a chance to find auto-generated files
like vnode_if.c if the object directory is available.

Reviewed by: emaste, jhb (previous version)
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19633

Details

Provenance
markjAuthored on
Reviewer
emaste
Differential Revision
D19633: Use -fdebug-prefix-map in the kernel build.
Parents
rS345347: fuse(4): use GTEST_SKIP in the tests
Branches
Unknown
Tags
Unknown