[Lldb-commits] [lldb] 4023bd0 - [lldb] Add boilerplate to recognize the .debug_rnglists.dwo section
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 26 04:58:51 PST 2019
Author: Pavel Labath
Date: 2019-11-26T13:58:26+01:00
New Revision: 4023bd05fcb4f75c6a11d661f407f8e0896176e2
URL: https://github.com/llvm/llvm-project/commit/4023bd05fcb4f75c6a11d661f407f8e0896176e2
DIFF: https://github.com/llvm/llvm-project/commit/4023bd05fcb4f75c6a11d661f407f8e0896176e2.diff
LOG: [lldb] Add boilerplate to recognize the .debug_rnglists.dwo section
Added:
Modified:
lldb/include/lldb/lldb-enumerations.h
lldb/source/Core/Section.cpp
lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
lldb/source/Symbol/ObjectFile.cpp
lldb/test/Shell/ObjectFile/ELF/section-types.yaml
Removed:
################################################################################
diff --git a/lldb/include/lldb/lldb-enumerations.h b/lldb/include/lldb/lldb-enumerations.h
index 3c80bcffec20..0a92365544f9 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -690,6 +690,7 @@ enum SectionType {
eSectionTypeDWARFDebugStrDwo,
eSectionTypeDWARFDebugStrOffsetsDwo,
eSectionTypeDWARFDebugTypesDwo,
+ eSectionTypeDWARFDebugRngListsDwo,
};
FLAGS_ENUM(EmulateInstructionOptions){
diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp
index 7615dc1d65c7..e8fcca4603df 100644
--- a/lldb/source/Core/Section.cpp
+++ b/lldb/source/Core/Section.cpp
@@ -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:
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index 3f8502548fc2..8eadaf1323d5 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -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)
diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
index aff1d1e87bb6..57c43de0c945 100644
--- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
+++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
@@ -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:
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
index eb307ce1cce1..db8d7b3747ec 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFContext.cpp
@@ -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);
}
diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp
index 38bc7722d0d0..4f6d74bbc757 100644
--- a/lldb/source/Symbol/ObjectFile.cpp
+++ b/lldb/source/Symbol/ObjectFile.cpp
@@ -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:
diff --git a/lldb/test/Shell/ObjectFile/ELF/section-types.yaml b/lldb/test/Shell/ObjectFile/ELF/section-types.yaml
index 9f6b4c0533b9..caac76a789ce 100644
--- a/lldb/test/Shell/ObjectFile/ELF/section-types.yaml
+++ b/lldb/test/Shell/ObjectFile/ELF/section-types.yaml
@@ -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
More information about the lldb-commits
mailing list