Skip to content

Commit d72f1f9

Browse files
GeorgeHuyuboGeorge Hu
and
George Hu
authored
Bug fix in FindModuleUUID (#137075)
In some core file, we are seeing that it's not always the case that the ELF header would exist in the first region in NT_FILES section. Therefore the FindModuleUUID is not able to find the module UUID by just returning the first entry with path matching. This fix change the behavior to continue search the NT_FILE entries until finding a valid UUID with path matching. Co-authored-by: George Hu <georgehuyubo@gmail.com>
1 parent 9a8f90d commit d72f1f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ void ProcessElfCore::UpdateBuildIdForNTFileEntries() {
289289
UUID ProcessElfCore::FindModuleUUID(const llvm::StringRef path) {
290290
// Returns the gnu uuid from matched NT_FILE entry
291291
for (NT_FILE_Entry &entry : m_nt_file_entries)
292-
if (path == entry.path)
292+
if (path == entry.path && entry.uuid.IsValid())
293293
return entry.uuid;
294294
return UUID();
295295
}

0 commit comments

Comments
 (0)