[Lldb-commits] [lldb] r333743 - Add .debug_names section glue code

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 1 05:06:45 PDT 2018


Author: labath
Date: Fri Jun  1 05:06:45 2018
New Revision: 333743

URL: http://llvm.org/viewvc/llvm-project?rev=333743&view=rev
Log:
Add .debug_names section glue code

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/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.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=333743&r1=333742&r2=333743&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Fri Jun  1 05:06:45 2018
@@ -657,6 +657,7 @@ enum SectionType {
                                // address
   eSectionTypeDWARFGNUDebugAltLink,
   eSectionTypeDWARFDebugTypes, // DWARF .debug_types section
+  eSectionTypeDWARFDebugNames, // DWARF v5 .debug_names
   eSectionTypeOther
 };
 

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=333743&r1=333742&r2=333743&view=diff
==============================================================================
--- lldb/trunk/lit/Modules/elf-section-types.yaml (original)
+++ lldb/trunk/lit/Modules/elf-section-types.yaml Fri Jun  1 05:06:45 2018
@@ -14,6 +14,11 @@
 # CHECK-NEXT: VM size: 0
 # CHECK-NEXT: File size: 8
 
+# CHECK: Name: .debug_names
+# CHECK-NEXT: Type: dwarf-names
+# CHECK-NEXT: VM size: 0
+# CHECK-NEXT: File size: 8
+
 # CHECK: Name: .gnu_debugaltlink
 # CHECK-NEXT: Type: dwarf-gnu-debugaltlink
 # CHECK-NEXT: VM size: 0
@@ -42,6 +47,10 @@ Sections:
     Type:            SHT_PROGBITS
     AddressAlign:    0x0000000000000001
     Content:         DEADBEEFBAADF00D
+  - Name:            .debug_names
+    Type:            SHT_PROGBITS
+    AddressAlign:    0x0000000000000001
+    Content:         DEADBEEFBAADF00D
   - Name:            .gnu_debugaltlink
     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=333743&r1=333742&r2=333743&view=diff
==============================================================================
--- lldb/trunk/source/Core/Section.cpp (original)
+++ lldb/trunk/source/Core/Section.cpp Fri Jun  1 05:06:45 2018
@@ -91,6 +91,8 @@ const char *Section::GetTypeAsCString()
     return "dwarf-str-offsets";
   case eSectionTypeDWARFDebugTypes:
     return "dwarf-types";
+  case eSectionTypeDWARFDebugNames:
+    return "dwarf-names";
   case eSectionTypeELFSymbolTable:
     return "elf-symbol-table";
   case eSectionTypeELFDynamicSymbols:

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=333743&r1=333742&r2=333743&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Fri Jun  1 05:06:45 2018
@@ -1791,6 +1791,7 @@ void ObjectFileELF::CreateSections(Secti
       static ConstString g_sect_name_dwarf_debug_loc(".debug_loc");
       static ConstString g_sect_name_dwarf_debug_macinfo(".debug_macinfo");
       static ConstString g_sect_name_dwarf_debug_macro(".debug_macro");
+      static ConstString g_sect_name_dwarf_debug_names(".debug_names");
       static ConstString g_sect_name_dwarf_debug_pubnames(".debug_pubnames");
       static ConstString g_sect_name_dwarf_debug_pubtypes(".debug_pubtypes");
       static ConstString g_sect_name_dwarf_debug_ranges(".debug_ranges");
@@ -1866,6 +1867,8 @@ void ObjectFileELF::CreateSections(Secti
         sect_type = eSectionTypeDWARFDebugMacInfo;
       else if (name == g_sect_name_dwarf_debug_macro)
         sect_type = eSectionTypeDWARFDebugMacro;
+      else if (name == g_sect_name_dwarf_debug_names)
+        sect_type = eSectionTypeDWARFDebugNames;
       else if (name == g_sect_name_dwarf_debug_pubnames)
         sect_type = eSectionTypeDWARFDebugPubNames;
       else if (name == g_sect_name_dwarf_debug_pubtypes)

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=333743&r1=333742&r2=333743&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Fri Jun  1 05:06:45 2018
@@ -1200,6 +1200,7 @@ AddressClass ObjectFileMachO::GetAddress
           case eSectionTypeDWARFDebugLoc:
           case eSectionTypeDWARFDebugMacInfo:
           case eSectionTypeDWARFDebugMacro:
+          case eSectionTypeDWARFDebugNames:
           case eSectionTypeDWARFDebugPubNames:
           case eSectionTypeDWARFDebugPubTypes:
           case eSectionTypeDWARFDebugRanges:
@@ -1455,6 +1456,7 @@ static lldb::SectionType GetSectionType(
   static ConstString g_sect_name_dwarf_debug_line("__debug_line");
   static ConstString g_sect_name_dwarf_debug_loc("__debug_loc");
   static ConstString g_sect_name_dwarf_debug_macinfo("__debug_macinfo");
+  static ConstString g_sect_name_dwarf_debug_names("__debug_names");
   static ConstString g_sect_name_dwarf_debug_pubnames("__debug_pubnames");
   static ConstString g_sect_name_dwarf_debug_pubtypes("__debug_pubtypes");
   static ConstString g_sect_name_dwarf_debug_ranges("__debug_ranges");
@@ -1484,6 +1486,8 @@ static lldb::SectionType GetSectionType(
     return eSectionTypeDWARFDebugLoc;
   if (section_name == g_sect_name_dwarf_debug_macinfo)
     return eSectionTypeDWARFDebugMacInfo;
+  if (section_name == g_sect_name_dwarf_debug_names)
+    return eSectionTypeDWARFDebugNames;
   if (section_name == g_sect_name_dwarf_debug_pubnames)
     return eSectionTypeDWARFDebugPubNames;
   if (section_name == g_sect_name_dwarf_debug_pubtypes)

Modified: lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp?rev=333743&r1=333742&r2=333743&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp Fri Jun  1 05:06:45 2018
@@ -692,6 +692,7 @@ void ObjectFilePECOFF::CreateSections(Se
         static ConstString g_sect_name_dwarf_debug_line(".debug_line");
         static ConstString g_sect_name_dwarf_debug_loc(".debug_loc");
         static ConstString g_sect_name_dwarf_debug_macinfo(".debug_macinfo");
+        static ConstString g_sect_name_dwarf_debug_names(".debug_names");
         static ConstString g_sect_name_dwarf_debug_pubnames(".debug_pubnames");
         static ConstString g_sect_name_dwarf_debug_pubtypes(".debug_pubtypes");
         static ConstString g_sect_name_dwarf_debug_ranges(".debug_ranges");
@@ -737,6 +738,8 @@ void ObjectFilePECOFF::CreateSections(Se
           section_type = eSectionTypeDWARFDebugLoc;
         else if (const_sect_name == g_sect_name_dwarf_debug_macinfo)
           section_type = eSectionTypeDWARFDebugMacInfo;
+        else if (const_sect_name == g_sect_name_dwarf_debug_names)
+          section_type = eSectionTypeDWARFDebugNames;
         else if (const_sect_name == g_sect_name_dwarf_debug_pubnames)
           section_type = eSectionTypeDWARFDebugPubNames;
         else if (const_sect_name == g_sect_name_dwarf_debug_pubtypes)

Modified: lldb/trunk/source/Symbol/ObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ObjectFile.cpp?rev=333743&r1=333742&r2=333743&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ObjectFile.cpp (original)
+++ lldb/trunk/source/Symbol/ObjectFile.cpp Fri Jun  1 05:06:45 2018
@@ -353,6 +353,7 @@ AddressClass ObjectFile::GetAddressClass
           case eSectionTypeDWARFDebugLoc:
           case eSectionTypeDWARFDebugMacInfo:
           case eSectionTypeDWARFDebugMacro:
+          case eSectionTypeDWARFDebugNames:
           case eSectionTypeDWARFDebugPubNames:
           case eSectionTypeDWARFDebugPubTypes:
           case eSectionTypeDWARFDebugRanges:




More information about the lldb-commits mailing list