Skip to content

Commit ab29359

Browse files
committed
lldb] Re-enable TestSymbolFileJSON on non Darwin platforms
Fix the crash in SymbolVendorELF and re-enable the test. (cherry picked from commit 12f709d)
1 parent 3b9292f commit ab29359

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ SymbolVendorELF::CreateInstance(const lldb::ModuleSP &module_sp,
111111
SectionList *module_section_list = module_sp->GetSectionList();
112112
SectionList *objfile_section_list = dsym_objfile_sp->GetSectionList();
113113

114+
if (!module_section_list || !!objfile_section_list)
115+
return nullptr;
116+
114117
static const SectionType g_sections[] = {
115118
eSectionTypeDWARFDebugAbbrev, eSectionTypeDWARFDebugAddr,
116119
eSectionTypeDWARFDebugAranges, eSectionTypeDWARFDebugCuIndex,

lldb/test/API/macosx/symbols/TestSymbolFileJSON.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ def setUp(self):
1212
self.source = 'main.c'
1313

1414
@no_debug_info_test
15-
@skipUnlessDarwin
1615
def test_symbol_file_json_address(self):
1716
"""Test that 'target symbols add' can load the symbols from a JSON file using file addresses."""
1817

0 commit comments

Comments
 (0)