[Lldb-commits] [llvm] [lldb] DEBUGINFOD based DWP acquisition for LLDB (PR #70996)
Daniel Thornburgh via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 2 16:14: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());
----------------
mysterymath wrote:
> @mysterymath that environment variable is used by the server, not the client.
Ah, I should have linked to the debuginfod-find man page instead; pardon my laziness. It is used by the client, it's just that the server also includes a client for federation purposes.
See https://sourceware.org/git/?p=elfutils.git;a=blob;f=debuginfod/debuginfod-client.c;h=dcf0503163fd73e126a2197d278f363fd6839810;hb=HEAD#l1881
https://github.com/llvm/llvm-project/pull/70996
More information about the lldb-commits
mailing list