Skip to content

Commit e1ce3da

Browse files
GeorgeHuyuboGeorge Hu
authored andcommitted
Automerge: 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 <[email protected]>
2 parents 58fe3a8 + d72f1f9 commit e1ce3da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
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)