diff options
| author | Pavel Labath <pavel@labath.sk> | 2019-06-12 11:42:42 +0000 |
|---|---|---|
| committer | Pavel Labath <pavel@labath.sk> | 2019-06-12 11:42:42 +0000 |
| commit | ad805ef95a75ceeef4efd300075025d7be0d918f (patch) | |
| tree | 20dd5f455785a1db17588c791bcdd06990df0d13 | |
| parent | 31908669c6d0937b9577e00051c6403213e8899c (diff) | |
| download | bcm5719-llvm-ad805ef95a75ceeef4efd300075025d7be0d918f.tar.gz bcm5719-llvm-ad805ef95a75ceeef4efd300075025d7be0d918f.zip | |
Recognise debug_types.dwo as a debug info section
This is a preparatory patch to allow reading type units from dwo files.
llvm-svn: 363146
| -rw-r--r-- | lldb/include/lldb/lldb-enumerations.h | 1 | ||||
| -rw-r--r-- | lldb/lit/Modules/ELF/section-types.yaml | 7 | ||||
| -rw-r--r-- | lldb/source/Core/Section.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 1 | ||||
| -rw-r--r-- | lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp | 1 | ||||
| -rw-r--r-- | lldb/source/Symbol/ObjectFile.cpp | 1 |
6 files changed, 13 insertions, 0 deletions
diff --git a/lldb/include/lldb/lldb-enumerations.h b/lldb/include/lldb/lldb-enumerations.h index 0920bdf6e77..9d2d9ba3050 100644 --- a/lldb/include/lldb/lldb-enumerations.h +++ b/lldb/include/lldb/lldb-enumerations.h @@ -684,6 +684,7 @@ enum SectionType { eSectionTypeDWARFDebugInfoDwo, eSectionTypeDWARFDebugStrDwo, eSectionTypeDWARFDebugStrOffsetsDwo, + eSectionTypeDWARFDebugTypesDwo, }; FLAGS_ENUM(EmulateInstructionOptions){ diff --git a/lldb/lit/Modules/ELF/section-types.yaml b/lldb/lit/Modules/ELF/section-types.yaml index 907d57b10cf..9f6b4c0533b 100644 --- a/lldb/lit/Modules/ELF/section-types.yaml +++ b/lldb/lit/Modules/ELF/section-types.yaml @@ -10,6 +10,9 @@ # CHECK-LABEL: Name: .debug_types # CHECK-NEXT: Type: dwarf-types +# CHECK-LABEL: Name: .debug_types.dwo +# CHECK-NEXT: Type: dwarf-types-dwo + # CHECK-LABEL: Name: .debug_names # CHECK-NEXT: Type: dwarf-names @@ -51,6 +54,10 @@ Sections: Type: SHT_PROGBITS AddressAlign: 0x0000000000000001 Content: DEADBEEFBAADF00D + - Name: .debug_types.dwo + Type: SHT_PROGBITS + AddressAlign: 0x0000000000000001 + Content: DEADBEEFBAADF00D - Name: .debug_names Type: SHT_PROGBITS AddressAlign: 0x0000000000000001 diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp index a0d4cee4739..f30ddd2c18c 100644 --- a/lldb/source/Core/Section.cpp +++ b/lldb/source/Core/Section.cpp @@ -104,6 +104,8 @@ const char *Section::GetTypeAsCString() const { return "dwarf-str-offsets-dwo"; case eSectionTypeDWARFDebugTypes: return "dwarf-types"; + case eSectionTypeDWARFDebugTypesDwo: + return "dwarf-types-dwo"; case eSectionTypeDWARFDebugNames: return "dwarf-names"; case eSectionTypeELFSymbolTable: diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index bc802040bf7..47d5664700d 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1705,6 +1705,7 @@ static SectionType GetSectionTypeFromName(llvm::StringRef Name) { .Case(".debug_str_offsets", eSectionTypeDWARFDebugStrOffsets) .Case(".debug_str_offsets.dwo", eSectionTypeDWARFDebugStrOffsetsDwo) .Case(".debug_types", eSectionTypeDWARFDebugTypes) + .Case(".debug_types.dwo", eSectionTypeDWARFDebugTypesDwo) .Case(".eh_frame", eSectionTypeEHFrame) .Case(".gnu_debugaltlink", eSectionTypeDWARFGNUDebugAltLink) .Case(".gosymtab", eSectionTypeGoSymtab) diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp index 42c14aa9f50..e1d68815351 100644 --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -1212,6 +1212,7 @@ AddressClass ObjectFileMachO::GetAddressClass(lldb::addr_t file_addr) { case eSectionTypeDWARFDebugStrOffsets: case eSectionTypeDWARFDebugStrOffsetsDwo: case eSectionTypeDWARFDebugTypes: + case eSectionTypeDWARFDebugTypesDwo: case eSectionTypeDWARFAppleNames: case eSectionTypeDWARFAppleTypes: case eSectionTypeDWARFAppleNamespaces: diff --git a/lldb/source/Symbol/ObjectFile.cpp b/lldb/source/Symbol/ObjectFile.cpp index c1cf7e42f16..172d2b3f01e 100644 --- a/lldb/source/Symbol/ObjectFile.cpp +++ b/lldb/source/Symbol/ObjectFile.cpp @@ -365,6 +365,7 @@ AddressClass ObjectFile::GetAddressClass(addr_t file_addr) { case eSectionTypeDWARFDebugStrOffsets: case eSectionTypeDWARFDebugStrOffsetsDwo: case eSectionTypeDWARFDebugTypes: + case eSectionTypeDWARFDebugTypesDwo: case eSectionTypeDWARFAppleNames: case eSectionTypeDWARFAppleTypes: case eSectionTypeDWARFAppleNamespaces: |

