diff --git a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp index 61e06cdfa02df..3595966b42e46 100644 --- a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp +++ b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp @@ -111,6 +111,9 @@ SymbolVendorELF::CreateInstance(const lldb::ModuleSP &module_sp, SectionList *module_section_list = module_sp->GetSectionList(); SectionList *objfile_section_list = dsym_objfile_sp->GetSectionList(); + if (!module_section_list || !!objfile_section_list) + return nullptr; + static const SectionType g_sections[] = { eSectionTypeDWARFDebugAbbrev, eSectionTypeDWARFDebugAddr, eSectionTypeDWARFDebugAranges, eSectionTypeDWARFDebugCuIndex, diff --git a/lldb/test/API/macosx/symbols/TestSymbolFileJSON.py b/lldb/test/API/macosx/symbols/TestSymbolFileJSON.py index 2e6d05ac6306e..31814ba5c85e2 100644 --- a/lldb/test/API/macosx/symbols/TestSymbolFileJSON.py +++ b/lldb/test/API/macosx/symbols/TestSymbolFileJSON.py @@ -12,7 +12,6 @@ def setUp(self): self.source = 'main.c' @no_debug_info_test - @skipUnlessDarwin def test_symbol_file_json_address(self): """Test that 'target symbols add' can load the symbols from a JSON file using file addresses."""