[lldb] Add boilerplate to recognize the .debug_rnglists.dwo section

This commit is contained in:
Pavel Labath 2019-11-26 11:00:23 +01:00
parent 30fc94be23
commit 4023bd05fc
7 changed files with 22 additions and 1 deletions

View File

@ -690,6 +690,7 @@ enum SectionType {
eSectionTypeDWARFDebugStrDwo,
eSectionTypeDWARFDebugStrOffsetsDwo,
eSectionTypeDWARFDebugTypesDwo,
eSectionTypeDWARFDebugRngListsDwo,
};
FLAGS_ENUM(EmulateInstructionOptions){

View File

@ -94,6 +94,8 @@ const char *Section::GetTypeAsCString() const {
return "dwarf-ranges";
case eSectionTypeDWARFDebugRngLists:
return "dwarf-rnglists";
case eSectionTypeDWARFDebugRngListsDwo:
return "dwarf-rnglists-dwo";
case eSectionTypeDWARFDebugStr:
return "dwarf-str";
case eSectionTypeDWARFDebugStrDwo:

View File

@ -1581,6 +1581,7 @@ static SectionType GetSectionTypeFromName(llvm::StringRef Name) {
.Case("pubtypes", eSectionTypeDWARFDebugPubTypes)
.Case("ranges", eSectionTypeDWARFDebugRanges)
.Case("rnglists", eSectionTypeDWARFDebugRngLists)
.Case("rnglists.dwo", eSectionTypeDWARFDebugRngListsDwo)
.Case("str", eSectionTypeDWARFDebugStr)
.Case("str.dwo", eSectionTypeDWARFDebugStrDwo)
.Case("str_offsets", eSectionTypeDWARFDebugStrOffsets)

View File

@ -1140,6 +1140,7 @@ AddressClass ObjectFileMachO::GetAddressClass(lldb::addr_t file_addr) {
case eSectionTypeDWARFDebugPubTypes:
case eSectionTypeDWARFDebugRanges:
case eSectionTypeDWARFDebugRngLists:
case eSectionTypeDWARFDebugRngListsDwo:
case eSectionTypeDWARFDebugStr:
case eSectionTypeDWARFDebugStrDwo:
case eSectionTypeDWARFDebugStrOffsets:

View File

@ -81,7 +81,8 @@ const DWARFDataExtractor &DWARFContext::getOrLoadRangesData() {
}
const DWARFDataExtractor &DWARFContext::getOrLoadRngListsData() {
return LoadOrGetSection(eSectionTypeDWARFDebugRngLists, llvm::None,
return LoadOrGetSection(eSectionTypeDWARFDebugRngLists,
eSectionTypeDWARFDebugRngListsDwo,
m_data_debug_rnglists);
}

View File

@ -360,6 +360,7 @@ AddressClass ObjectFile::GetAddressClass(addr_t file_addr) {
case eSectionTypeDWARFDebugPubTypes:
case eSectionTypeDWARFDebugRanges:
case eSectionTypeDWARFDebugRngLists:
case eSectionTypeDWARFDebugRngListsDwo:
case eSectionTypeDWARFDebugStr:
case eSectionTypeDWARFDebugStrDwo:
case eSectionTypeDWARFDebugStrOffsets:

View File

@ -13,6 +13,12 @@
# CHECK-LABEL: Name: .debug_types.dwo
# CHECK-NEXT: Type: dwarf-types-dwo
# CHECK-LABEL: Name: .debug_rnglists
# CHECK-NEXT: Type: dwarf-rnglists
# CHECK-LABEL: Name: .debug_rnglists.dwo
# CHECK-NEXT: Type: dwarf-rnglists-dwo
# CHECK-LABEL: Name: .debug_names
# CHECK-NEXT: Type: dwarf-names
@ -58,6 +64,14 @@ Sections:
Type: SHT_PROGBITS
AddressAlign: 0x0000000000000001
Content: DEADBEEFBAADF00D
- Name: .debug_rnglists
Type: SHT_PROGBITS
AddressAlign: 0x0000000000000001
Content: DEADBEEFBAADF00D
- Name: .debug_rnglists.dwo
Type: SHT_PROGBITS
AddressAlign: 0x0000000000000001
Content: DEADBEEFBAADF00D
- Name: .debug_names
Type: SHT_PROGBITS
AddressAlign: 0x0000000000000001