[Lldb-commits] [lldb] [lldb] Fix ELF core debugging (PR #117070)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 20 15:34:09 PST 2024


================
@@ -157,6 +157,10 @@ DynamicLoader::GetSectionListFromModule(const ModuleSP module) const {
 ModuleSP DynamicLoader::FindModuleViaTarget(const FileSpec &file) {
   Target &target = m_process->GetTarget();
   ModuleSpec module_spec(file, target.GetArchitecture());
+  if (UUID uuid = m_process->FindBuildId(file.GetPath())) {
+    // Process may have the UUID for the module, e.g. ELF core.
+    module_spec.GetUUID().SetFromStringRef(uuid.GetAsString());
----------------
clayborg wrote:

Use `Process::GetModuleSpec`:
```
ModuleSpec module_spec(file, target.GetArchitecture()); 
// Process may be able to augment the module_spec with UUID, e.g. ELF core.
m_process->GetModuleSpec(file, target.GetArchitecture(), module_spec);
```

https://github.com/llvm/llvm-project/pull/117070


More information about the lldb-commits mailing list