[LLDB] - Support the single file split DWARF.

DWARF5 spec describes a single file split dwarf case
(when .dwo sections are in the .o files).

Problem is that LLDB does not work correctly in that case.
The issue is that, for example, both .debug_info and .debug_info.dwo
has the same type: eSectionTypeDWARFDebugInfo. And when code searches
section by type it might find the regular debug section
and not the .dwo one.

The patch fixes that. With it, LLDB is able to work with
output compiled with -gsplit-dwarf=single flag correctly.

Differential revision: https://reviews.llvm.org/D52296

llvm-svn: 346848
This commit is contained in:
George Rimar
2018-11-14 10:35:14 +00:00
parent 814e7974c6
commit 98963db57d
11 changed files with 249 additions and 17 deletions

View File

@@ -1897,9 +1897,9 @@ void ObjectFileELF::CreateSections(SectionList &unified_section_list) {
else if (name == g_sect_name_dwarf_debug_str_offsets)
sect_type = eSectionTypeDWARFDebugStrOffsets;
else if (name == g_sect_name_dwarf_debug_abbrev_dwo)
sect_type = eSectionTypeDWARFDebugAbbrev;
sect_type = eSectionTypeDWARFDebugAbbrevDwo;
else if (name == g_sect_name_dwarf_debug_info_dwo)
sect_type = eSectionTypeDWARFDebugInfo;
sect_type = eSectionTypeDWARFDebugInfoDwo;
else if (name == g_sect_name_dwarf_debug_line_dwo)
sect_type = eSectionTypeDWARFDebugLine;
else if (name == g_sect_name_dwarf_debug_line_str_dwo)
@@ -1911,9 +1911,9 @@ void ObjectFileELF::CreateSections(SectionList &unified_section_list) {
else if (name == g_sect_name_dwarf_debug_loclists_dwo)
sect_type = eSectionTypeDWARFDebugLocLists;
else if (name == g_sect_name_dwarf_debug_str_dwo)
sect_type = eSectionTypeDWARFDebugStr;
sect_type = eSectionTypeDWARFDebugStrDwo;
else if (name == g_sect_name_dwarf_debug_str_offsets_dwo)
sect_type = eSectionTypeDWARFDebugStrOffsets;
sect_type = eSectionTypeDWARFDebugStrOffsetsDwo;
else if (name == g_sect_name_eh_frame)
sect_type = eSectionTypeEHFrame;
else if (name == g_sect_name_arm_exidx)