SymbolVendorELF: Perform build-id lookup even without a debug link
authorPavel Labath <pavel@labath.sk>
Tue, 6 Aug 2019 08:18:39 +0000 (08:18 +0000)
committerPavel Labath <pavel@labath.sk>
Tue, 6 Aug 2019 08:18:39 +0000 (08:18 +0000)
commit001ecbde1112356f7c820037ef1e3ca75f03be3b
tree9e61d4e080931d5f9d4e42ccb8eb7f8da809d88c
parent1b3718e609c9fd7c8af09d9c9f17e2937847fb38
SymbolVendorELF: Perform build-id lookup even without a debug link

Summary:
The debug link and build-id lookups are two independent ways one can
search for a separate symbol file. However, our implementation in
SymbolVendorELF was tying the two together and refusing to look up the
symbol file based on a build id if the file did not contain a debug
link.

This patch makes it possible to search for the symbol file with
just one of the two methods available. To demonstrate, I split the
build-id-case test into two, so that we test the search using both
methods.

Reviewers: jankratochvil, mgorny, clayborg, espindola, alexshap

Subscribers: emaste, arichardson, MaskRay, lldb-commits

Differential Revision: https://reviews.llvm.org/D65561

llvm-svn: 367994
lldb/lit/Modules/ELF/build-id-case.yaml
lldb/lit/Modules/ELF/gnu-debuglink.yaml [new file with mode: 0644]
lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
lldb/source/Symbol/LocateSymbolFile.cpp