Previously LLDB required the DWP file to be located next to the executable file
(see the code in SymbolFileDWARF::GetDwpSymbolFile).
This diff uses the helper function Symbols::LocateExecutableSymbolFile
to search for DWP files in the standard locations for debug symbols.
Test plan:
Build a toy test example
main.cpp
clang -gsplit-dwarf -g -O0 main.cpp -o main.exe
llvm-dwp -e main.exe -o main.exe.dwp
mkdir -p debug_symbols
mv main.exe.dwp debug_symbols/main.exe.dwp
rm -f main.dwo
Run lldb:
lldb
settings set target.debug-file-search-paths ./debug_symbols
file ./main.exe
br set --name f
r
Check that debugging works
(setting breakpoints, printing local variables (this was not working before))
What do you think about adding a new argument to Symbols::LocateExecutableSymbolFile (with a potential default value) to specify if we want to check the UUID and then move this logic to the place where we are looking for the dwp file? I think that would make dwp specific logic more concise in one place.