[llvm] [lldb] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)

Kevin Frei via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 2 09:47:37 PDT 2023


================
@@ -396,8 +398,22 @@ Symbols::LocateExecutableSymbolFile(const ModuleSpec &module_spec,
       }
     }
   }
-
-  return LocateExecutableSymbolFileDsym(module_spec);
+  FileSpec dsym_bundle = LocateExecutableSymbolFileDsym(module_spec);
+  if (dsym_bundle)
+    return dsym_bundle;
+
+  // If we didn't find anything by looking locally, let's try Debuginfod.
+  if (module_uuid.IsValid() && llvm::canUseDebuginfod()) {
+    llvm::object::BuildID build_id(module_uuid.GetBytes());
+    llvm::Expected<std::string> result =
+        llvm::getCachedOrDownloadDebuginfo(build_id);
+    if (result)
+      return FileSpec(*result);
+    // An error is just fine, here...
+    consumeError(result.takeError());
----------------
kevinfrei wrote:

That was my reason for just consuming it in the first place. I think adding a "debuginfod_failure_log" setting makes sense here. And I just signed myself up for more work :/ 

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


More information about the llvm-commits mailing list