summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-11-14 13:01:15 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-11-14 13:01:15 +0000
commit004bcb78ed532ff9897b757f35e02ec1b802ff00 (patch)
treed5b477b6d16809654e01ea4c5601ddd34deecf18 /lldb/source/Plugins/ObjectFile
parentcdb170794be637bb278cda421e37c5f71bd3cf1a (diff)
downloadbcm5719-llvm-004bcb78ed532ff9897b757f35e02ec1b802ff00.tar.gz
bcm5719-llvm-004bcb78ed532ff9897b757f35e02ec1b802ff00.zip
[LLDB] - Recommit r346848 "[LLDB] - Support the single file split DWARF.".
Test cases were updated to not use the local compilation dir which is different between development pc and build bots. Original commit message: [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/D52403 llvm-svn: 346855
Diffstat (limited to 'lldb/source/Plugins/ObjectFile')
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp8
-rw-r--r--lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp4
2 files changed, 8 insertions, 4 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 1001eaef555..efb6a0b85c1 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -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)
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index e14e4094f66..dafbb64847c 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -1187,11 +1187,13 @@ AddressClass ObjectFileMachO::GetAddressClass(lldb::addr_t file_addr) {
case eSectionTypeDebug:
case eSectionTypeDWARFDebugAbbrev:
+ case eSectionTypeDWARFDebugAbbrevDwo:
case eSectionTypeDWARFDebugAddr:
case eSectionTypeDWARFDebugAranges:
case eSectionTypeDWARFDebugCuIndex:
case eSectionTypeDWARFDebugFrame:
case eSectionTypeDWARFDebugInfo:
+ case eSectionTypeDWARFDebugInfoDwo:
case eSectionTypeDWARFDebugLine:
case eSectionTypeDWARFDebugLineStr:
case eSectionTypeDWARFDebugLoc:
@@ -1204,7 +1206,9 @@ AddressClass ObjectFileMachO::GetAddressClass(lldb::addr_t file_addr) {
case eSectionTypeDWARFDebugRanges:
case eSectionTypeDWARFDebugRngLists:
case eSectionTypeDWARFDebugStr:
+ case eSectionTypeDWARFDebugStrDwo:
case eSectionTypeDWARFDebugStrOffsets:
+ case eSectionTypeDWARFDebugStrOffsetsDwo:
case eSectionTypeDWARFDebugTypes:
case eSectionTypeDWARFAppleNames:
case eSectionTypeDWARFAppleTypes:
OpenPOWER on IntegriCloud