Skip to content

Commit f0eb0c5

Browse files
authored
Don't require a UUID in a .dwp file. (#83935)
DWP files don't usually have a GNU build ID built into them. When searching for a .dwp file, don't require a UUID to be in the .dwp file. The debug info search information was checking for a UUID in the .dwp file when debug info search paths were being used. This is now fixed by not specifying the UUID in the ModuleSpec being used for the .dwp file search.
1 parent 351a82b commit f0eb0c5

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4377,7 +4377,6 @@ const std::shared_ptr<SymbolFileDWARFDwo> &SymbolFileDWARF::GetDwpSymbolFile() {
43774377
FileSpecList search_paths = Target::GetDefaultDebugFileSearchPaths();
43784378
ModuleSpec module_spec;
43794379
module_spec.GetFileSpec() = m_objfile_sp->GetFileSpec();
4380-
module_spec.GetUUID() = m_objfile_sp->GetUUID();
43814380
for (const auto &symfile : symfiles.files()) {
43824381
module_spec.GetSymbolFileSpec() =
43834382
FileSpec(symfile.GetPath() + ".dwp", symfile.GetPathStyle());

lldb/test/Shell/SymbolFile/DWARF/x86/dwp-separate-debug-file.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,20 @@
139139
// RUN: -o "target variable a" \
140140
// RUN: -b %t | FileCheck %s
141141

142+
// Now move the .debug and .dwp file into another directory so that we can use
143+
// the target.debug-file-search-paths setting to search for the files.
144+
// RUN: mkdir -p %t-debug-info-dir
145+
// RUN: mv %t.dwp %t-debug-info-dir
146+
// RUN: mv %t.debug %t-debug-info-dir
147+
// RUN: %lldb \
148+
// RUN: -O "log enable dwarf split" \
149+
// RUN: -O "setting set target.debug-file-search-paths '%t-debug-info-dir'" \
150+
// RUN: -o "target variable a" \
151+
// RUN: -b %t | FileCheck %s
152+
// RUN:
153+
154+
// Now move the .debug and .dwp file into another directory so that we can use
155+
// the target.debug-file-search-paths setting to search for the files.
142156
// CHECK: Searching for DWP using:
143157
// CHECK: Found DWP file:
144158
// CHECK: (A) a = (x = 47)

0 commit comments

Comments
 (0)