[lldb] Don't process symlinks deep inside DWARFUnit
authorPavel Labath <pavel@labath.sk>
Fri, 20 Dec 2019 15:34:55 +0000 (16:34 +0100)
committerPavel Labath <pavel@labath.sk>
Mon, 23 Dec 2019 10:24:04 +0000 (11:24 +0100)
commit3cfb6677b2aa20f782d9bb0f7958e61f5a976c16
tree3214335185ad6290742e3e4cf02296bdda33cf49
parent2cebc1a7170fc6c0ff3d15e677a59582450eb81d
[lldb] Don't process symlinks deep inside DWARFUnit

Summary:
This code is handling debug info paths starting with /proc/self/cwd,
which is one of the mechanisms people use to obtain "relocatable" debug
info (the idea being that one starts the debugger with an appropriate
cwd and things "just work").

Instead of resolving the symlinks inside DWARFUnit, we can do the same
thing more elegantly by hooking into the existing Module path remapping
code. Since llvm::DWARFUnit does not support any similar functionality,
doing things this way is also a step towards unifying llvm and lldb
dwarf parsers.

Reviewers: JDevlieghere, aprantl, clayborg, jdoerfert

Subscribers: lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D71770
lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp