[Lldb-commits] [lldb] r363146 - Recognise debug_types.dwo as a debug info section

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 12 04:42:42 PDT 2019


Author: labath
Date: Wed Jun 12 04:42:42 2019
New Revision: 363146

URL: http://llvm.org/viewvc/llvm-project?rev=363146&view=rev
Log:
Recognise debug_types.dwo as a debug info section

This is a preparatory patch to allow reading type units from dwo files.

Modified:
    lldb/trunk/include/lldb/lldb-enumerations.h
    lldb/trunk/lit/Modules/ELF/section-types.yaml
    lldb/trunk/source/Core/Section.cpp
    lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
    lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
    lldb/trunk/source/Symbol/ObjectFile.cpp

Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=363146&r1=363145&r2=363146&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Wed Jun 12 04:42:42 2019
@@ -684,6 +684,7 @@ enum SectionType {
   eSectionTypeDWARFDebugInfoDwo,
   eSectionTypeDWARFDebugStrDwo,
   eSectionTypeDWARFDebugStrOffsetsDwo,
+  eSectionTypeDWARFDebugTypesDwo,
 };
 
 FLAGS_ENUM(EmulateInstructionOptions){

Modified: lldb/trunk/lit/Modules/ELF/section-types.yaml
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Modules/ELF/section-types.yaml?rev=363146&r1=363145&r2=363146&view=diff
==============================================================================
--- lldb/trunk/lit/Modules/ELF/section-types.yaml (original)
+++ lldb/trunk/lit/Modules/ELF/section-types.yaml Wed Jun 12 04:42:42 2019
@@ -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

Modified: lldb/trunk/source/Core/Section.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Section.cpp?rev=363146&r1=363145&r2=363146&view=diff
==============================================================================
--- lldb/trunk/source/Core/Section.cpp (original)
+++ lldb/trunk/source/Core/Section.cpp Wed Jun 12 04:42:42 2019
@@ -104,6 +104,8 @@ const char *Section::GetTypeAsCString()
     return "dwarf-str-offsets-dwo";
   case eSectionTypeDWARFDebugTypes:
     return "dwarf-types";
+  case eSectionTypeDWARFDebugTypesDwo:
+    return "dwarf-types-dwo";
   case eSectionTypeDWARFDebugNames:
     return "dwarf-names";
   case eSectionTypeELFSymbolTable:

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=363146&r1=363145&r2=363146&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Wed Jun 12 04:42:42 2019
@@ -1705,6 +1705,7 @@ static SectionType GetSectionTypeFromNam
       .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)

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=363146&r1=363145&r2=363146&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Wed Jun 12 04:42:42 2019
@@ -1212,6 +1212,7 @@ AddressClass ObjectFileMachO::GetAddress
           case eSectionTypeDWARFDebugStrOffsets:
           case eSectionTypeDWARFDebugStrOffsetsDwo:
           case eSectionTypeDWARFDebugTypes:
+          case eSectionTypeDWARFDebugTypesDwo:
           case eSectionTypeDWARFAppleNames:
           case eSectionTypeDWARFAppleTypes:
           case eSectionTypeDWARFAppleNamespaces:

Modified: lldb/trunk/source/Symbol/ObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ObjectFile.cpp?rev=363146&r1=363145&r2=363146&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ObjectFile.cpp (original)
+++ lldb/trunk/source/Symbol/ObjectFile.cpp Wed Jun 12 04:42:42 2019
@@ -365,6 +365,7 @@ AddressClass ObjectFile::GetAddressClass
           case eSectionTypeDWARFDebugStrOffsets:
           case eSectionTypeDWARFDebugStrOffsetsDwo:
           case eSectionTypeDWARFDebugTypes:
+          case eSectionTypeDWARFDebugTypesDwo:
           case eSectionTypeDWARFAppleNames:
           case eSectionTypeDWARFAppleTypes:
           case eSectionTypeDWARFAppleNamespaces:




More information about the lldb-commits mailing list