[Lldb-commits] [PATCH] D65560: ObjectFile[ELF]: Refactor gnu_debuglink interface
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 1 01:42:22 PDT 2019
labath created this revision.
labath added reviewers: clayborg, jankratochvil, mgorny.
Herald added subscribers: MaskRay, arichardson, emaste.
Herald added a reviewer: espindola.
The contents of the gnu_debuglink section were passed through the
GetDebugSymbolFilePaths interface, which was more generic than needed.
As the only class implementing this function is ObjectFileELF, we can
modify the function to return just a single FileSpec (instead of a
list). Also, since the SymbolVendorELF already assumes ELF object files,
we don't have to make this method available on the generic ObjectFile
interface -- instead we can put it on ObjectFileELF directly.
This change also makes is so that if the Module has an explicit symbol
file spec set, we disregard the value the value of the debug link
(instead of doing a secondary lookup using that). I think it makes sense
to honor the users wishes if he had explicitly set the symbol file spec,
and this seems to be consistent with what SymbolVendorMacOSX is doing
(SymbolVendorMacOSX.cpp:125).
The main reason for making these changes is to make the treatment of
build-ids and debug links simpler in the follow-up patch.
https://reviews.llvm.org/D65560
Files:
include/lldb/Symbol/ObjectFile.h
source/Plugins/ObjectFile/Breakpad/ObjectFileBreakpad.h
source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
source/Plugins/ObjectFile/ELF/ObjectFileELF.h
source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65560.212749.patch
Type: text/x-patch
Size: 9512 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190801/e44d544c/attachment-0001.bin>
More information about the lldb-commits
mailing list