fjricci created this revision. fjricci added reviewers: clayborg, zturner, labath. Herald added subscribers: JDevlieghere, arichardson, emaste.
In order to allow some sections to exist either in split debug-info or in the main binary, don't replace non-empty sections with empty sections. https://reviews.llvm.org/D44041 Files: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp Index: source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp =================================================================== --- source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp +++ source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp @@ -141,7 +141,7 @@ SectionType section_type = g_sections[idx]; SectionSP section_sp( objfile_section_list->FindSectionByType(section_type, true)); - if (section_sp) { + if (section_sp && section_sp->GetFileSize()) { SectionSP module_section_sp( module_section_list->FindSectionByType(section_type, true)); if (module_section_sp) Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp =================================================================== --- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -2004,7 +2004,7 @@ SectionType section_type = g_sections[idx]; SectionSP section_sp( elf_section_list->FindSectionByType(section_type, true)); - if (section_sp) { + if (section_sp && section_sp->GetFileSize()) { SectionSP module_section_sp( unified_section_list.FindSectionByType(section_type, true)); if (module_section_sp)
Index: source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp =================================================================== --- source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp +++ source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp @@ -141,7 +141,7 @@ SectionType section_type = g_sections[idx]; SectionSP section_sp( objfile_section_list->FindSectionByType(section_type, true)); - if (section_sp) { + if (section_sp && section_sp->GetFileSize()) { SectionSP module_section_sp( module_section_list->FindSectionByType(section_type, true)); if (module_section_sp) Index: source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp =================================================================== --- source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -2004,7 +2004,7 @@ SectionType section_type = g_sections[idx]; SectionSP section_sp( elf_section_list->FindSectionByType(section_type, true)); - if (section_sp) { + if (section_sp && section_sp->GetFileSize()) { SectionSP module_section_sp( unified_section_list.FindSectionByType(section_type, true)); if (module_section_sp)
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits