[Lldb-commits] [lldb] [lldb][debuginfod] Fix the DebugInfoD PR that caused issues when working with stripped binaries (PR #99362)
Kevin Frei via lldb-commits
lldb-commits at lists.llvm.org
Wed Jul 17 11:07:31 PDT 2024
================
@@ -106,12 +106,19 @@ SymbolVendorELF::CreateInstance(const lldb::ModuleSP &module_sp,
FileSpec dsym_fspec =
PluginManager::LocateExecutableSymbolFile(module_spec, search_paths);
if (!dsym_fspec || IsDwpSymbolFile(module_sp, dsym_fspec)) {
- // If we have a stripped binary or if we got a DWP file, we should prefer
- // symbols in the executable acquired through a plugin.
+ // If we have a stripped binary or if we have a DWP file, symbol locator
+ // plugins may be able to give us an unstripped binary or an
+ // 'only-keep-debug' stripped file.
ModuleSpec unstripped_spec =
PluginManager::LocateExecutableObjectFile(module_spec);
if (!unstripped_spec)
return nullptr;
+ // If we got the original binary back from the plugin manager, the plugins
+ // didn't find anything more useful that the stripped binary. (The default
+ // symbol locator plugin returns the original binary if it can't find
+ // anything else.)
+ if (unstripped_spec.GetFileSpec() == module_spec.GetFileSpec())
----------------
kevinfrei wrote:
Cleaned the comment up a bit.
https://github.com/llvm/llvm-project/pull/99362
More information about the lldb-commits
mailing list