]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Prepend DW_AT_comp_dir to relative line number directory table entries.
authormarkj <markj@FreeBSD.org>
Wed, 27 Mar 2019 19:32:21 +0000 (19:32 +0000)
committermarkj <markj@FreeBSD.org>
Wed, 27 Mar 2019 19:32:21 +0000 (19:32 +0000)
commit89272daaee6a708326f2a868f1c8e77a2edbbcab
tree1fccdc6dff8684036e7e3d4d78f03a493662a70c
parent9eb714978ebf6e178f8f9519ad7d1082872cfaad
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
contrib/elftoolchain/libdwarf/libdwarf_lineno.c