diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp')
| -rw-r--r-- | lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp index a850a1044cf..e61e5763fab 100644 --- a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp +++ b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp @@ -71,16 +71,17 @@ SymbolVendorELF::CreateInstance(const lldb::ModuleSP &module_sp, if (!uuid) return nullptr; + // If the main object file already contains debug info, then we are done. + if (obj_file->GetSectionList()->FindSectionByType( + lldb::eSectionTypeDWARFDebugInfo, true)) + return nullptr; + // If the module specified a filespec, use that. FileSpec fspec = module_sp->GetSymbolFileFileSpec(); // Otherwise, try gnu_debuglink, if one exists. if (!fspec) fspec = obj_file->GetDebugLink().getValueOr(FileSpec()); - // If we have no debug symbol files, then nothing to do. - if (!fspec) - return nullptr; - static Timer::Category func_cat(LLVM_PRETTY_FUNCTION); Timer scoped_timer(func_cat, "SymbolVendorELF::CreateInstance (module = %s)", module_sp->GetFileSpec().GetPath().c_str()); |

