HomeFreeBSD

Prepend DW_AT_comp_dir to relative line number directory table entries.

Description

Prepend DW_AT_comp_dir to relative line number directory table entries.

Relative directories may appear in the line number program for a CPU if
files were included via a relative path, for instance with "-I.".
Previously, dwarf_srclines(3) and dwarf_srcfiles(3) would return the
relative path, so addr2line, for instance, would do the same. However,
we can get an absolute path by prepending the compilation directory, so
change libdwarf to do that to improve compatibility with GNU binutils
and since it is more useful in general.

Reviewed by: jhb
Discussed with: emaste
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19705

Details

Provenance
markjAuthored on
Reviewer
jhb
Differential Revision
D19705: Avoid mapping the current directory with -fdebug-prefix-map.
Parents
rS345592: MFC r339705:
Branches
Unknown
Tags
Unknown