[Lldb-commits] [lldb] r245931 - Add support for DW_FORM_GNU_[addr, str]_index

Tamas Berghammer via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 25 04:45:59 PDT 2015


Author: tberghammer
Date: Tue Aug 25 06:45:58 2015
New Revision: 245931

URL: http://llvm.org/viewvc/llvm-project?rev=245931&view=rev
Log:
Add support for DW_FORM_GNU_[addr,str]_index

These are 2 new value currently in experimental status used when split
debug info is enabled.

Differential revision: http://reviews.llvm.org/D12238

Modified:
    lldb/trunk/include/lldb/lldb-enumerations.h
    lldb/trunk/source/Expression/IRExecutionUnit.cpp
    lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
    lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
    lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
    lldb/trunk/source/Symbol/ClangASTContext.cpp
    lldb/trunk/source/Symbol/ObjectFile.cpp
    lldb/trunk/source/Utility/ConvertEnum.cpp

Modified: lldb/trunk/include/lldb/lldb-enumerations.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/lldb-enumerations.h?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/include/lldb/lldb-enumerations.h (original)
+++ lldb/trunk/include/lldb/lldb-enumerations.h Tue Aug 25 06:45:58 2015
@@ -595,6 +595,7 @@ namespace lldb {
         eSectionTypeDataObjCMessageRefs,    // Pointer to function pointer + selector
         eSectionTypeDataObjCCFStrings,      // Objective C const CFString/NSString objects
         eSectionTypeDWARFDebugAbbrev,
+        eSectionTypeDWARFDebugAddr,
         eSectionTypeDWARFDebugAranges,
         eSectionTypeDWARFDebugFrame,
         eSectionTypeDWARFDebugInfo,
@@ -605,6 +606,7 @@ namespace lldb {
         eSectionTypeDWARFDebugPubTypes,
         eSectionTypeDWARFDebugRanges,
         eSectionTypeDWARFDebugStr,
+        eSectionTypeDWARFDebugStrOffsets,
         eSectionTypeDWARFAppleNames,
         eSectionTypeDWARFAppleTypes,
         eSectionTypeDWARFAppleNamespaces,

Modified: lldb/trunk/source/Expression/IRExecutionUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRExecutionUnit.cpp?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRExecutionUnit.cpp (original)
+++ lldb/trunk/source/Expression/IRExecutionUnit.cpp Tue Aug 25 06:45:58 2015
@@ -488,6 +488,8 @@ IRExecutionUnit::GetSectionTypeFromSecti
                         sect_type = lldb::eSectionTypeDWARFDebugAbbrev;
                     else if (dwarf_name.equals("aranges"))
                         sect_type = lldb::eSectionTypeDWARFDebugAranges;
+                    else if (dwarf_name.equals("addr"))
+                        sect_type = lldb::eSectionTypeDWARFDebugAddr;
                     break;
 
                 case 'f':
@@ -522,6 +524,8 @@ IRExecutionUnit::GetSectionTypeFromSecti
                 case 's':
                     if (dwarf_name.equals("str"))
                         sect_type = lldb::eSectionTypeDWARFDebugStr;
+                    else if (dwarf_name.equals("str_offsets"))
+                        sect_type = lldb::eSectionTypeDWARFDebugStrOffsets;
                     break;
 
                 case 'r':
@@ -789,6 +793,7 @@ IRExecutionUnit::CommitAllocations (lldb
         {
         case lldb::eSectionTypeInvalid:
         case lldb::eSectionTypeDWARFDebugAbbrev:
+        case lldb::eSectionTypeDWARFDebugAddr:
         case lldb::eSectionTypeDWARFDebugAranges:
         case lldb::eSectionTypeDWARFDebugFrame:
         case lldb::eSectionTypeDWARFDebugInfo:
@@ -799,6 +804,7 @@ IRExecutionUnit::CommitAllocations (lldb
         case lldb::eSectionTypeDWARFDebugPubTypes:
         case lldb::eSectionTypeDWARFDebugRanges:
         case lldb::eSectionTypeDWARFDebugStr:
+        case lldb::eSectionTypeDWARFDebugStrOffsets:
         case lldb::eSectionTypeDWARFAppleNames:
         case lldb::eSectionTypeDWARFAppleTypes:
         case lldb::eSectionTypeDWARFAppleNamespaces:

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=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Tue Aug 25 06:45:58 2015
@@ -1672,6 +1672,7 @@ ObjectFileELF::CreateSections(SectionLis
             static ConstString g_sect_name_tdata (".tdata");
             static ConstString g_sect_name_tbss (".tbss");
             static ConstString g_sect_name_dwarf_debug_abbrev (".debug_abbrev");
+            static ConstString g_sect_name_dwarf_debug_addr (".debug_addr");
             static ConstString g_sect_name_dwarf_debug_aranges (".debug_aranges");
             static ConstString g_sect_name_dwarf_debug_frame (".debug_frame");
             static ConstString g_sect_name_dwarf_debug_info (".debug_info");
@@ -1682,6 +1683,7 @@ ObjectFileELF::CreateSections(SectionLis
             static ConstString g_sect_name_dwarf_debug_pubtypes (".debug_pubtypes");
             static ConstString g_sect_name_dwarf_debug_ranges (".debug_ranges");
             static ConstString g_sect_name_dwarf_debug_str (".debug_str");
+            static ConstString g_sect_name_dwarf_debug_str_offsets (".debug_str_offsets");
             static ConstString g_sect_name_eh_frame (".eh_frame");
 
             SectionType sect_type = eSectionTypeOther;
@@ -1715,18 +1717,20 @@ ObjectFileELF::CreateSections(SectionLis
             // MISSING? .gnu_debugdata - "mini debuginfo / MiniDebugInfo" section, http://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html
             // MISSING? .debug-index - http://src.chromium.org/viewvc/chrome/trunk/src/build/gdb-add-index?pathrev=144644
             // MISSING? .debug_types - Type descriptions from DWARF 4? See http://gcc.gnu.org/wiki/DwarfSeparateTypeInfo
-            else if (name == g_sect_name_dwarf_debug_abbrev)    sect_type = eSectionTypeDWARFDebugAbbrev;
-            else if (name == g_sect_name_dwarf_debug_aranges)   sect_type = eSectionTypeDWARFDebugAranges;
-            else if (name == g_sect_name_dwarf_debug_frame)     sect_type = eSectionTypeDWARFDebugFrame;
-            else if (name == g_sect_name_dwarf_debug_info)      sect_type = eSectionTypeDWARFDebugInfo;
-            else if (name == g_sect_name_dwarf_debug_line)      sect_type = eSectionTypeDWARFDebugLine;
-            else if (name == g_sect_name_dwarf_debug_loc)       sect_type = eSectionTypeDWARFDebugLoc;
-            else if (name == g_sect_name_dwarf_debug_macinfo)   sect_type = eSectionTypeDWARFDebugMacInfo;
-            else if (name == g_sect_name_dwarf_debug_pubnames)  sect_type = eSectionTypeDWARFDebugPubNames;
-            else if (name == g_sect_name_dwarf_debug_pubtypes)  sect_type = eSectionTypeDWARFDebugPubTypes;
-            else if (name == g_sect_name_dwarf_debug_ranges)    sect_type = eSectionTypeDWARFDebugRanges;
-            else if (name == g_sect_name_dwarf_debug_str)       sect_type = eSectionTypeDWARFDebugStr;
-            else if (name == g_sect_name_eh_frame)              sect_type = eSectionTypeEHFrame;
+            else if (name == g_sect_name_dwarf_debug_abbrev)      sect_type = eSectionTypeDWARFDebugAbbrev;
+            else if (name == g_sect_name_dwarf_debug_addr)        sect_type = eSectionTypeDWARFDebugAddr;
+            else if (name == g_sect_name_dwarf_debug_aranges)     sect_type = eSectionTypeDWARFDebugAranges;
+            else if (name == g_sect_name_dwarf_debug_frame)       sect_type = eSectionTypeDWARFDebugFrame;
+            else if (name == g_sect_name_dwarf_debug_info)        sect_type = eSectionTypeDWARFDebugInfo;
+            else if (name == g_sect_name_dwarf_debug_line)        sect_type = eSectionTypeDWARFDebugLine;
+            else if (name == g_sect_name_dwarf_debug_loc)         sect_type = eSectionTypeDWARFDebugLoc;
+            else if (name == g_sect_name_dwarf_debug_macinfo)     sect_type = eSectionTypeDWARFDebugMacInfo;
+            else if (name == g_sect_name_dwarf_debug_pubnames)    sect_type = eSectionTypeDWARFDebugPubNames;
+            else if (name == g_sect_name_dwarf_debug_pubtypes)    sect_type = eSectionTypeDWARFDebugPubTypes;
+            else if (name == g_sect_name_dwarf_debug_ranges)      sect_type = eSectionTypeDWARFDebugRanges;
+            else if (name == g_sect_name_dwarf_debug_str)         sect_type = eSectionTypeDWARFDebugStr;
+            else if (name == g_sect_name_dwarf_debug_str_offsets) sect_type = eSectionTypeDWARFDebugStrOffsets;
+            else if (name == g_sect_name_eh_frame)                sect_type = eSectionTypeEHFrame;
 
             switch (header.sh_type)
             {
@@ -1791,17 +1795,19 @@ ObjectFileELF::CreateSections(SectionLis
         {
             static const SectionType g_sections[] =
             {
-                eSectionTypeDWARFDebugAranges,
-                eSectionTypeDWARFDebugInfo,
                 eSectionTypeDWARFDebugAbbrev,
+                eSectionTypeDWARFDebugAddr,
+                eSectionTypeDWARFDebugAranges,
                 eSectionTypeDWARFDebugFrame,
+                eSectionTypeDWARFDebugInfo,
                 eSectionTypeDWARFDebugLine,
-                eSectionTypeDWARFDebugStr,
                 eSectionTypeDWARFDebugLoc,
                 eSectionTypeDWARFDebugMacInfo,
                 eSectionTypeDWARFDebugPubNames,
                 eSectionTypeDWARFDebugPubTypes,
                 eSectionTypeDWARFDebugRanges,
+                eSectionTypeDWARFDebugStr,
+                eSectionTypeDWARFDebugStrOffsets,
                 eSectionTypeELFSymbolTable,
             };
             SectionList *elf_section_list = m_sections_ap.get();

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=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Tue Aug 25 06:45:58 2015
@@ -1322,6 +1322,7 @@ ObjectFileMachO::GetAddressClass (lldb::
 
                     case eSectionTypeDebug:
                     case eSectionTypeDWARFDebugAbbrev:
+                    case eSectionTypeDWARFDebugAddr:
                     case eSectionTypeDWARFDebugAranges:
                     case eSectionTypeDWARFDebugFrame:
                     case eSectionTypeDWARFDebugInfo:
@@ -1332,6 +1333,7 @@ ObjectFileMachO::GetAddressClass (lldb::
                     case eSectionTypeDWARFDebugPubTypes:
                     case eSectionTypeDWARFDebugRanges:
                     case eSectionTypeDWARFDebugStr:
+                    case eSectionTypeDWARFDebugStrOffsets:
                     case eSectionTypeDWARFAppleNames:
                     case eSectionTypeDWARFAppleTypes:
                     case eSectionTypeDWARFAppleNamespaces:

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp Tue Aug 25 06:45:58 2015
@@ -660,8 +660,6 @@ DWARFCompileUnit::Index (const uint32_t
                          NameToDIE& types,
                          NameToDIE& namespaces)
 {
-    const DWARFDataExtractor* debug_str = &m_dwarf2Data->get_debug_str_data();
-
     DWARFFormValue::FixedFormSizes fixed_form_sizes =
         DWARFFormValue::GetFixedFormSizesForAddressSize (GetAddressByteSize(), m_is_dwarf64);
 
@@ -727,7 +725,7 @@ DWARFCompileUnit::Index (const uint32_t
                 {
                 case DW_AT_name:
                     if (attributes.ExtractFormValueAtIndex(m_dwarf2Data, i, form_value))
-                        name = form_value.AsCString(debug_str);
+                        name = form_value.AsCString(m_dwarf2Data);
                     break;
 
                 case DW_AT_declaration:
@@ -743,7 +741,7 @@ DWARFCompileUnit::Index (const uint32_t
                 case DW_AT_MIPS_linkage_name:
                 case DW_AT_linkage_name:
                     if (attributes.ExtractFormValueAtIndex(m_dwarf2Data, i, form_value))
-                        mangled_cstr = form_value.AsCString(debug_str);                        
+                        mangled_cstr = form_value.AsCString(m_dwarf2Data);
                     break;
 
                 case DW_AT_low_pc:

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h Tue Aug 25 06:45:58 2015
@@ -53,6 +53,7 @@ public:
     dw_offset_t GetAbbrevOffset() const;
     uint8_t     GetAddressByteSize() const { return m_addr_size; }
     dw_addr_t   GetBaseAddress() const { return m_base_addr; }
+    dw_addr_t   GetAddrBase() const { return 0; } // TODO: Read out DW_AT_addr_base from the parent compile unit
     void        ClearDIEs(bool keep_compile_unit_die);
     void        BuildAddressRangeTable (SymbolFileDWARF* dwarf2Data,
                                         DWARFDebugAranges* debug_aranges);

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp Tue Aug 25 06:45:58 2015
@@ -226,9 +226,11 @@ DWARFDebugInfoEntry::FastExtract
                         break;
 
                     // signed or unsigned LEB 128 values
-                    case DW_FORM_sdata       :
-                    case DW_FORM_udata       :
-                    case DW_FORM_ref_udata   :
+                    case DW_FORM_sdata         :
+                    case DW_FORM_udata         :
+                    case DW_FORM_ref_udata     :
+                    case DW_FORM_GNU_addr_index:
+                    case DW_FORM_GNU_str_index :
                         debug_info_data.Skip_LEB128 (&offset);
                         break;
 
@@ -389,9 +391,11 @@ DWARFDebugInfoEntry::Extract
                                 break;
 
                             // signed or unsigned LEB 128 values
-                            case DW_FORM_sdata       :
-                            case DW_FORM_udata       :
-                            case DW_FORM_ref_udata   :
+                            case DW_FORM_sdata         :
+                            case DW_FORM_udata         :
+                            case DW_FORM_ref_udata     :
+                            case DW_FORM_GNU_addr_index:
+                            case DW_FORM_GNU_str_index :
                                 debug_info_data.Skip_LEB128(&offset);
                                 break;
 
@@ -819,13 +823,13 @@ DWARFDebugInfoEntry::GetDIENamesAndRange
 
                 case DW_AT_name:
                     if (name == NULL)
-                        name = form_value.AsCString(&dwarf2Data->get_debug_str_data());
+                        name = form_value.AsCString(dwarf2Data);
                     break;
 
                 case DW_AT_MIPS_linkage_name:
                 case DW_AT_linkage_name:
                     if (mangled == NULL)
-                        mangled = form_value.AsCString(&dwarf2Data->get_debug_str_data());
+                        mangled = form_value.AsCString(dwarf2Data);
                     break;
 
                 case DW_AT_abstract_origin:
@@ -1062,7 +1066,6 @@ DWARFDebugInfoEntry::DumpAttribute
     bool verbose    = s.GetVerbose();
     bool show_form  = s.GetFlags().Test(DWARFDebugInfo::eDumpFlag_ShowForm);
     
-    const DWARFDataExtractor* debug_str_data = dwarf2Data ? &dwarf2Data->get_debug_str_data() : NULL;
     if (verbose)
         s.Offset (*offset_ptr);
     else
@@ -1094,7 +1097,7 @@ DWARFDebugInfoEntry::DumpAttribute
     // Always dump form value if verbose is enabled
     if (verbose)
     {
-        form_value.Dump(s, debug_str_data);
+        form_value.Dump(s, dwarf2Data);
     }
 
 
@@ -1127,7 +1130,7 @@ DWARFDebugInfoEntry::DumpAttribute
             if (blockData)
             {
                 if (!verbose)
-                    form_value.Dump(s, debug_str_data);
+                    form_value.Dump(s, dwarf2Data);
 
                 // Location description is inlined in data in the form value
                 DWARFDataExtractor locationData(debug_info_data, (*offset_ptr) - form_value.Unsigned(), form_value.Unsigned());
@@ -1144,7 +1147,7 @@ DWARFDebugInfoEntry::DumpAttribute
                 if (dwarf2Data)
                 {
                     if ( !verbose )
-                        form_value.Dump(s, debug_str_data);
+                        form_value.Dump(s, dwarf2Data);
                     DWARFLocationList::Dump(s, cu, dwarf2Data->get_debug_loc_data(), debug_loc_offset);
                 }
                 else
@@ -1160,7 +1163,7 @@ DWARFDebugInfoEntry::DumpAttribute
     case DW_AT_specification:
         {
             uint64_t abstract_die_offset = form_value.Reference();
-            form_value.Dump(s, debug_str_data);
+            form_value.Dump(s, dwarf2Data);
         //  *ostrm_ptr << HEX32 << abstract_die_offset << " ( ";
             if ( verbose ) s.PutCString(" ( ");
             GetName(dwarf2Data, cu, abstract_die_offset, s);
@@ -1172,7 +1175,7 @@ DWARFDebugInfoEntry::DumpAttribute
         {
             uint64_t type_die_offset = form_value.Reference();
             if (!verbose)
-                form_value.Dump(s, debug_str_data);
+                form_value.Dump(s, dwarf2Data);
             s.PutCString(" ( ");
             AppendTypeName(dwarf2Data, cu, type_die_offset, s);
             s.PutCString(" )");
@@ -1182,7 +1185,7 @@ DWARFDebugInfoEntry::DumpAttribute
     case DW_AT_ranges:
         {
             if ( !verbose )
-                form_value.Dump(s, debug_str_data);
+                form_value.Dump(s, dwarf2Data);
             lldb::offset_t ranges_offset = form_value.Unsigned();
             dw_addr_t base_addr = cu ? cu->GetBaseAddress() : 0;
             if (dwarf2Data)
@@ -1192,7 +1195,7 @@ DWARFDebugInfoEntry::DumpAttribute
 
     default:
         if ( !verbose )
-            form_value.Dump(s, debug_str_data);
+            form_value.Dump(s, dwarf2Data);
         break;
     }
 
@@ -1360,7 +1363,7 @@ DWARFDebugInfoEntry::GetAttributeValueAs
 {
     DWARFFormValue form_value;
     if (GetAttributeValue(dwarf2Data, cu, attr, form_value))
-        return form_value.AsCString(&dwarf2Data->get_debug_str_data());
+        return form_value.AsCString(dwarf2Data);
     return fail_value;
 }
 
@@ -1443,13 +1446,14 @@ DWARFDebugInfoEntry::GetAttributeHighPC
 ) const
 {
     DWARFFormValue form_value;
-
     if (GetAttributeValue(dwarf2Data, cu, DW_AT_high_pc, form_value))
     {
-        dw_addr_t hi_pc = form_value.Unsigned();
-        if (form_value.Form() != DW_FORM_addr)
-            hi_pc += lo_pc; // DWARF4 can specify the hi_pc as an <offset-from-lowpc>
-        return hi_pc; 
+        dw_form_t form = form_value.Form();
+        if (form == DW_FORM_addr || form == DW_FORM_GNU_addr_index)
+            return form_value.Address(dwarf2Data);
+        
+        // DWARF4 can specify the hi_pc as an <offset-from-lowpc>
+        return lo_pc + form_value.Unsigned();
     }
     return fail_value;
 }
@@ -1582,7 +1586,7 @@ DWARFDebugInfoEntry::GetName
 {
     DWARFFormValue form_value;
     if (GetAttributeValue(dwarf2Data, cu, DW_AT_name, form_value))
-        return form_value.AsCString(&dwarf2Data->get_debug_str_data());
+        return form_value.AsCString(dwarf2Data);
     else if (GetAttributeValue(dwarf2Data, cu, DW_AT_specification, form_value))
     {
         DWARFCompileUnitSP cu_sp_ptr;
@@ -1615,19 +1619,19 @@ DWARFDebugInfoEntry::GetMangledName
     bool substitute_name_allowed
 ) const
 {
-    const char* name = NULL;
+    const char* name = nullptr;
     DWARFFormValue form_value;
 
     if (GetAttributeValue(dwarf2Data, cu, DW_AT_MIPS_linkage_name, form_value))
-        name = form_value.AsCString(&dwarf2Data->get_debug_str_data());
+        name = form_value.AsCString(dwarf2Data);
 
     if (GetAttributeValue(dwarf2Data, cu, DW_AT_linkage_name, form_value))
-        name = form_value.AsCString(&dwarf2Data->get_debug_str_data());
+        name = form_value.AsCString(dwarf2Data);
 
-    if (substitute_name_allowed && name == NULL)
+    if (substitute_name_allowed && name == nullptr)
     {
         if (GetAttributeValue(dwarf2Data, cu, DW_AT_name, form_value))
-            name = form_value.AsCString(&dwarf2Data->get_debug_str_data());
+            name = form_value.AsCString(dwarf2Data);
     }
     return name;
 }
@@ -1653,11 +1657,11 @@ DWARFDebugInfoEntry::GetPubname
     DWARFFormValue form_value;
 
     if (GetAttributeValue(dwarf2Data, cu, DW_AT_MIPS_linkage_name, form_value))
-        name = form_value.AsCString(&dwarf2Data->get_debug_str_data());
+        name = form_value.AsCString(dwarf2Data);
     else if (GetAttributeValue(dwarf2Data, cu, DW_AT_linkage_name, form_value))
-        name = form_value.AsCString(&dwarf2Data->get_debug_str_data());
+        name = form_value.AsCString(dwarf2Data);
     else if (GetAttributeValue(dwarf2Data, cu, DW_AT_name, form_value))
-        name = form_value.AsCString(&dwarf2Data->get_debug_str_data());
+        name = form_value.AsCString(dwarf2Data);
     else if (GetAttributeValue(dwarf2Data, cu, DW_AT_specification, form_value))
     {
         // The specification DIE may be in another compile unit so we need
@@ -1709,7 +1713,7 @@ DWARFDebugInfoEntry::GetName
             DWARFFormValue form_value;
             if (die.GetAttributeValue(dwarf2Data, cu, DW_AT_name, form_value))
             {
-                const char* name = form_value.AsCString(&dwarf2Data->get_debug_str_data());
+                const char* name = form_value.AsCString(dwarf2Data);
                 if (name)
                 {
                     s.PutCString(name);

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp Tue Aug 25 06:45:58 2015
@@ -77,9 +77,6 @@ DWARFDebugPubnames::GeneratePubnames(Sym
     DWARFDebugInfo* debug_info = dwarf2Data->DebugInfo();
     if (debug_info)
     {
-
-        const DWARFDataExtractor* debug_str = &dwarf2Data->get_debug_str_data();
-
         uint32_t cu_idx = 0;
         const uint32_t num_compile_units = dwarf2Data->GetNumCompileUnits();
         for (cu_idx = 0; cu_idx < num_compile_units; ++cu_idx)
@@ -123,13 +120,13 @@ DWARFDebugPubnames::GeneratePubnames(Sym
                         {
                         case DW_AT_name:
                             if (attributes.ExtractFormValueAtIndex(dwarf2Data, i, form_value))
-                                name = form_value.AsCString(debug_str);
+                                name = form_value.AsCString(dwarf2Data);
                             break;
 
                         case DW_AT_MIPS_linkage_name:
                         case DW_AT_linkage_name:
                             if (attributes.ExtractFormValueAtIndex(dwarf2Data, i, form_value))
-                                mangled = form_value.AsCString(debug_str);
+                                mangled = form_value.AsCString(dwarf2Data);
                             break;
 
                         case DW_AT_low_pc:

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp Tue Aug 25 06:45:58 2015
@@ -187,11 +187,7 @@ DWARFFormValue::ExtractValue(const DWARF
         case DW_FORM_data2:     m_value.value.uval = data.GetU16(offset_ptr);                           break;
         case DW_FORM_data4:     m_value.value.uval = data.GetU32(offset_ptr);                           break;
         case DW_FORM_data8:     m_value.value.uval = data.GetU64(offset_ptr);                           break;
-        case DW_FORM_string:    m_value.value.cstr = data.GetCStr(offset_ptr);
-                                // Set the string value to also be the data for inlined cstr form values only
-                                // so we can tell the difference between DW_FORM_string and DW_FORM_strp form
-                                // values;
-                                m_value.data = (const uint8_t*)m_value.value.cstr;                      break;
+        case DW_FORM_string:    m_value.value.cstr = data.GetCStr(offset_ptr);                          break;
         case DW_FORM_exprloc:
         case DW_FORM_block:     m_value.value.uval = data.GetULEB128(offset_ptr); is_block = true;      break;
         case DW_FORM_block1:    m_value.value.uval = data.GetU8(offset_ptr); is_block = true;           break;
@@ -219,10 +215,12 @@ DWARFFormValue::ExtractValue(const DWARF
             indirect = true;
             break;
 
-        case DW_FORM_sec_offset:    assert(m_cu);
-                                    m_value.value.uval = data.GetMaxU64(offset_ptr, DWARFCompileUnit::IsDWARF64(m_cu) ? 8 : 4);  break;
-        case DW_FORM_flag_present:  m_value.value.uval = 1;                                             break;
-        case DW_FORM_ref_sig8:      m_value.value.uval = data.GetU64(offset_ptr);                       break;
+        case DW_FORM_sec_offset:     assert(m_cu);
+                                     m_value.value.uval = data.GetMaxU64(offset_ptr, DWARFCompileUnit::IsDWARF64(m_cu) ? 8 : 4); break;
+        case DW_FORM_flag_present:   m_value.value.uval = 1;                                            break;
+        case DW_FORM_ref_sig8:       m_value.value.uval = data.GetU64(offset_ptr);                      break;
+        case DW_FORM_GNU_str_index:  m_value.value.uval = data.GetULEB128(offset_ptr);                  break;
+        case DW_FORM_GNU_addr_index: m_value.value.uval = data.GetULEB128(offset_ptr);                  break;
         default:
             return false;
             break;
@@ -322,6 +320,8 @@ DWARFFormValue::SkipValue(dw_form_t form
     case DW_FORM_sdata:
     case DW_FORM_udata:
     case DW_FORM_ref_udata:
+    case DW_FORM_GNU_addr_index:
+    case DW_FORM_GNU_str_index:
         debug_info_data.Skip_LEB128(offset_ptr);
         return true;
 
@@ -342,7 +342,7 @@ DWARFFormValue::SkipValue(dw_form_t form
 
 
 void
-DWARFFormValue::Dump(Stream &s, const DWARFDataExtractor* debug_str_data) const
+DWARFFormValue::Dump(Stream &s, SymbolFileDWARF* symbol_file) const
 {
     uint64_t uvalue = Unsigned();
     bool cu_relative_offset = false;
@@ -353,13 +353,13 @@ DWARFFormValue::Dump(Stream &s, const DW
     {
     case DW_FORM_addr:      s.Address(uvalue, sizeof (uint64_t)); break;
     case DW_FORM_flag:
-    case DW_FORM_data1:     s.PutHex8(uvalue);     break;
+    case DW_FORM_data1:     s.PutHex8(uvalue);         break;
     case DW_FORM_data2:     s.PutHex16(uvalue);        break;
     case DW_FORM_sec_offset:
     case DW_FORM_data4:     s.PutHex32(uvalue);        break;
     case DW_FORM_ref_sig8:
     case DW_FORM_data8:     s.PutHex64(uvalue);        break;
-    case DW_FORM_string:    s.QuotedCString(AsCString(NULL));          break;
+    case DW_FORM_string:    s.QuotedCString(AsCString(symbol_file)); break;
     case DW_FORM_exprloc:
     case DW_FORM_block:
     case DW_FORM_block1:
@@ -395,12 +395,12 @@ DWARFFormValue::Dump(Stream &s, const DW
     case DW_FORM_sdata:     s.PutSLEB128(uvalue); break;
     case DW_FORM_udata:     s.PutULEB128(uvalue); break;
     case DW_FORM_strp:
-        if (debug_str_data)
+        if (symbol_file)
         {
             if (verbose)
                 s.Printf(" .debug_str[0x%8.8x] = ", (uint32_t)uvalue);
 
-            const char* dbg_str = AsCString(debug_str_data);
+            const char* dbg_str = AsCString(symbol_file);
             if (dbg_str)
                 s.QuotedCString(dbg_str);
         }
@@ -444,13 +444,48 @@ DWARFFormValue::Dump(Stream &s, const DW
 }
 
 const char*
-DWARFFormValue::AsCString(const DWARFDataExtractor* debug_str_data_ptr) const
+DWARFFormValue::AsCString(SymbolFileDWARF* symbol_file) const
 {
-    if (IsInlinedCStr())
+    if (m_form == DW_FORM_string)
+    {
         return m_value.value.cstr;
-    else if (debug_str_data_ptr)
-        return debug_str_data_ptr->PeekCStr(m_value.value.uval);
-    return NULL;
+    }
+    else if (m_form == DW_FORM_strp)
+    {
+        if (!symbol_file)
+            return nullptr;
+
+        return symbol_file->get_debug_str_data().PeekCStr(m_value.value.uval);
+    }
+    else if (m_form == DW_FORM_GNU_str_index)
+    {
+        if (!symbol_file)
+            return nullptr;
+
+        uint32_t index_size = m_cu->IsDWARF64() ? 8 : 4;
+        lldb::offset_t offset = m_value.value.uval * index_size;
+        dw_offset_t str_offset = symbol_file->get_debug_str_offsets_data().GetMaxU64(&offset, index_size);
+        return symbol_file->get_debug_str_data().PeekCStr(str_offset);
+    }
+    return nullptr;
+}
+
+dw_addr_t
+DWARFFormValue::Address(SymbolFileDWARF* symbol_file) const
+{
+    if (m_form == DW_FORM_addr)
+        return Unsigned();
+
+    assert(m_cu);
+    assert(m_form == DW_FORM_GNU_addr_index);
+
+    if (!symbol_file)
+        return 0;
+
+    uint32_t index_size = m_cu->GetAddressByteSize();
+    dw_offset_t addr_base = m_cu->GetAddrBase();
+    lldb::offset_t offset = addr_base + m_value.value.uval * index_size;
+    return symbol_file->get_debug_addr_data().GetMaxU64(&offset, index_size);
 }
 
 uint64_t
@@ -500,9 +535,7 @@ DWARFFormValue::Reference (dw_offset_t b
 const uint8_t*
 DWARFFormValue::BlockData() const
 {
-    if (!IsInlinedCStr())
-        return m_value.data;
-    return NULL;
+    return m_value.data;
 }
 
 
@@ -537,7 +570,9 @@ DWARFFormValue::IsDataForm(const dw_form
 }
 
 int
-DWARFFormValue::Compare (const DWARFFormValue& a_value, const DWARFFormValue& b_value, const DWARFDataExtractor* debug_str_data_ptr)
+DWARFFormValue::Compare (const DWARFFormValue& a_value,
+                         const DWARFFormValue& b_value,
+                         SymbolFileDWARF* symbol_file)
 {
     dw_form_t a_form = a_value.Form();
     dw_form_t b_form = b_value.Form();
@@ -558,6 +593,7 @@ DWARFFormValue::Compare (const DWARFForm
     case DW_FORM_sec_offset:
     case DW_FORM_flag_present:
     case DW_FORM_ref_sig8:
+    case DW_FORM_GNU_addr_index:
         {
             uint64_t a = a_value.Unsigned();
             uint64_t b = b_value.Unsigned();
@@ -581,9 +617,10 @@ DWARFFormValue::Compare (const DWARFForm
 
     case DW_FORM_string:
     case DW_FORM_strp:
+    case DW_FORM_GNU_str_index:
         {
-            const char *a_string = a_value.AsCString(debug_str_data_ptr);
-            const char *b_string = b_value.AsCString(debug_str_data_ptr);
+            const char *a_string = a_value.AsCString(symbol_file);
+            const char *b_string = b_value.AsCString(symbol_file);
             if (a_string == b_string)
                 return 0;
             else if (a_string && b_string)

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h Tue Aug 25 06:45:58 2015
@@ -14,6 +14,7 @@
 #include "DWARFDataExtractor.h"
 
 class DWARFCompileUnit;
+class SymbolFileDWARF;
 
 class DWARFFormValue
 {
@@ -80,10 +81,9 @@ public:
     dw_form_t           Form()  const { return m_form; }
     void                SetForm(dw_form_t form) { m_form = form; }
     const ValueType&    Value() const { return m_value; }
-    void                Dump(lldb_private::Stream &s, const lldb_private::DWARFDataExtractor* debug_str_data) const;
+    void                Dump(lldb_private::Stream &s, SymbolFileDWARF* symbol_file) const;
     bool                ExtractValue(const lldb_private::DWARFDataExtractor& data,
                                      lldb::offset_t* offset_ptr);
-    bool                IsInlinedCStr() const { return (m_value.data != NULL) && m_value.data == (const uint8_t*)m_value.value.cstr; }
     const uint8_t*      BlockData() const;
     uint64_t            Reference() const;
     uint64_t            Reference (dw_offset_t offset) const;
@@ -92,13 +92,16 @@ public:
     void                SetUnsigned(uint64_t uval) { m_value.value.uval = uval; }
     int64_t             Signed() const { return m_value.value.sval; }
     void                SetSigned(int64_t sval) { m_value.value.sval = sval; }
-    const char*         AsCString(const lldb_private::DWARFDataExtractor* debug_str_data_ptr) const;
+    const char*         AsCString(SymbolFileDWARF* symbol_file) const;
+    dw_addr_t           Address(SymbolFileDWARF* symbol_file) const;
     bool                SkipValue(const lldb_private::DWARFDataExtractor& debug_info_data, lldb::offset_t *offset_ptr) const;
     static bool         SkipValue(const dw_form_t form, const lldb_private::DWARFDataExtractor& debug_info_data, lldb::offset_t *offset_ptr, const DWARFCompileUnit* cu);
     static bool         IsBlockForm(const dw_form_t form);
     static bool         IsDataForm(const dw_form_t form);
     static FixedFormSizes GetFixedFormSizesForAddressSize (uint8_t addr_size, bool is_dwarf64);
-    static int          Compare (const DWARFFormValue& a, const DWARFFormValue& b, const lldb_private::DWARFDataExtractor* debug_str_data_ptr);
+    static int          Compare (const DWARFFormValue& a, 
+                                 const DWARFFormValue& b,
+                                 SymbolFileDWARF* symbol_file);
 protected:
     const DWARFCompileUnit* m_cu; // Compile unit for this form
     dw_form_t   m_form;     // Form for this value

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.h Tue Aug 25 06:45:58 2015
@@ -307,6 +307,8 @@ struct DWARFMappedHash
                 case DW_FORM_sdata:
                 case DW_FORM_udata:
                 case DW_FORM_ref_udata:
+                case DW_FORM_GNU_addr_index:
+                case DW_FORM_GNU_str_index:
                     hash_data_has_fixed_byte_size = false;
                     // Fall through to the cases below...
                 case DW_FORM_flag:

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Tue Aug 25 06:45:58 2015
@@ -781,6 +781,12 @@ SymbolFileDWARF::get_debug_abbrev_data()
 }
 
 const DWARFDataExtractor&
+SymbolFileDWARF::get_debug_addr_data()
+{
+    return GetCachedSectionData (flagsGotDebugAddrData, eSectionTypeDWARFDebugAddr, m_data_debug_addr);
+}
+
+const DWARFDataExtractor&
 SymbolFileDWARF::get_debug_aranges_data()
 {
     return GetCachedSectionData (flagsGotDebugArangesData, eSectionTypeDWARFDebugAranges, m_data_debug_aranges);
@@ -823,6 +829,12 @@ SymbolFileDWARF::get_debug_str_data()
 }
 
 const DWARFDataExtractor&
+SymbolFileDWARF::get_debug_str_offsets_data()
+{
+    return GetCachedSectionData (flagsGotDebugStrOffsetsData, eSectionTypeDWARFDebugStrOffsets, m_data_debug_str_offsets);
+}
+
+const DWARFDataExtractor&
 SymbolFileDWARF::get_apple_names_data()
 {
     return GetCachedSectionData (flagsGotAppleNamesData, eSectionTypeDWARFAppleNames, m_data_apple_names);
@@ -2548,7 +2560,7 @@ SymbolFileDWARF::FunctionDieMatchesParti
         {
             if (attributes.ExtractFormValueAtIndex(this, idx, form_value))
             {
-                const char *mangled_name = form_value.AsCString(&get_debug_str_data());
+                const char *mangled_name = form_value.AsCString(this);
                 if (mangled_name)
                     best_name.SetValue (ConstString(mangled_name), true);
             }
@@ -2559,7 +2571,7 @@ SymbolFileDWARF::FunctionDieMatchesParti
             idx = attributes.FindAttributeIndex(DW_AT_name);
             if (idx != UINT32_MAX && attributes.ExtractFormValueAtIndex(this, idx, form_value))
             {
-                const char *name = form_value.AsCString(&get_debug_str_data());
+                const char *name = form_value.AsCString(this);
                 best_name.SetValue (ConstString(name), false);
             }
         }
@@ -4021,9 +4033,9 @@ SymbolFileDWARF::ParseVariableDIE
                     case DW_AT_decl_file:   decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(form_value.Unsigned())); break;
                     case DW_AT_decl_line:   decl.SetLine(form_value.Unsigned()); break;
                     case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break;
-                    case DW_AT_name:        name = form_value.AsCString(&get_debug_str_data()); break;
+                    case DW_AT_name:        name = form_value.AsCString(this); break;
                     case DW_AT_linkage_name:
-                    case DW_AT_MIPS_linkage_name: mangled = form_value.AsCString(&get_debug_str_data()); break;
+                    case DW_AT_MIPS_linkage_name: mangled = form_value.AsCString(this); break;
                     case DW_AT_type:        type_uid = form_value.Reference(); break;
                     case DW_AT_external:    is_external = form_value.Boolean(); break;
                     case DW_AT_const_value:
@@ -4080,7 +4092,7 @@ SymbolFileDWARF::ParseVariableDIE
                                 }
                                 else
                                 {
-                                    const char *str = form_value.AsCString(&debug_info_data);
+                                    const char *str = form_value.AsCString(this);
                                     uint32_t string_offset = str - (const char *)debug_info_data.GetDataStart();
                                     uint32_t string_length = strlen(str) + 1;
                                     location.CopyOpcodeData(module, debug_info_data, string_offset, string_length);

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h Tue Aug 25 06:45:58 2015
@@ -241,6 +241,7 @@ public:
     GetPluginVersion() override;
 
     const lldb_private::DWARFDataExtractor&     get_debug_abbrev_data ();
+    const lldb_private::DWARFDataExtractor&     get_debug_addr_data ();
     const lldb_private::DWARFDataExtractor&     get_debug_aranges_data ();
     const lldb_private::DWARFDataExtractor&     get_debug_frame_data ();
     const lldb_private::DWARFDataExtractor&     get_debug_info_data ();
@@ -248,6 +249,7 @@ public:
     const lldb_private::DWARFDataExtractor&     get_debug_loc_data ();
     const lldb_private::DWARFDataExtractor&     get_debug_ranges_data ();
     const lldb_private::DWARFDataExtractor&     get_debug_str_data ();
+    const lldb_private::DWARFDataExtractor&     get_debug_str_offsets_data ();
     const lldb_private::DWARFDataExtractor&     get_apple_names_data ();
     const lldb_private::DWARFDataExtractor&     get_apple_types_data ();
     const lldb_private::DWARFDataExtractor&     get_apple_namespaces_data ();
@@ -323,20 +325,22 @@ protected:
     enum
     {
         flagsGotDebugAbbrevData     = (1 << 0),
-        flagsGotDebugArangesData    = (1 << 1),
-        flagsGotDebugFrameData      = (1 << 2),
-        flagsGotDebugInfoData       = (1 << 3),
-        flagsGotDebugLineData       = (1 << 4),
-        flagsGotDebugLocData        = (1 << 5),
-        flagsGotDebugMacInfoData    = (1 << 6),
-        flagsGotDebugPubNamesData   = (1 << 7),
-        flagsGotDebugPubTypesData   = (1 << 8),
-        flagsGotDebugRangesData     = (1 << 9),
-        flagsGotDebugStrData        = (1 << 10),
-        flagsGotAppleNamesData      = (1 << 11),
-        flagsGotAppleTypesData      = (1 << 12),
-        flagsGotAppleNamespacesData = (1 << 13),
-        flagsGotAppleObjCData       = (1 << 14)
+        flagsGotDebugAddrData       = (1 << 1),
+        flagsGotDebugArangesData    = (1 << 2),
+        flagsGotDebugFrameData      = (1 << 3),
+        flagsGotDebugInfoData       = (1 << 4),
+        flagsGotDebugLineData       = (1 << 5),
+        flagsGotDebugLocData        = (1 << 6),
+        flagsGotDebugMacInfoData    = (1 << 7),
+        flagsGotDebugPubNamesData   = (1 << 8),
+        flagsGotDebugPubTypesData   = (1 << 9),
+        flagsGotDebugRangesData     = (1 << 10),
+        flagsGotDebugStrData        = (1 << 11),
+        flagsGotDebugStrOffsetsData = (1 << 12),
+        flagsGotAppleNamesData      = (1 << 13),
+        flagsGotAppleTypesData      = (1 << 14),
+        flagsGotAppleNamespacesData = (1 << 15),
+        flagsGotAppleObjCData       = (1 << 16)
     };
     
     bool
@@ -560,8 +564,9 @@ protected:
     lldb::ModuleWP                        m_debug_map_module_wp;
     SymbolFileDWARFDebugMap *             m_debug_map_symfile;
     lldb_private::Flags                   m_flags;
-    lldb_private::DWARFDataExtractor      m_dwarf_data; 
+    lldb_private::DWARFDataExtractor      m_dwarf_data;
     lldb_private::DWARFDataExtractor      m_data_debug_abbrev;
+    lldb_private::DWARFDataExtractor      m_data_debug_addr;
     lldb_private::DWARFDataExtractor      m_data_debug_aranges;
     lldb_private::DWARFDataExtractor      m_data_debug_frame;
     lldb_private::DWARFDataExtractor      m_data_debug_info;
@@ -569,6 +574,7 @@ protected:
     lldb_private::DWARFDataExtractor      m_data_debug_loc;
     lldb_private::DWARFDataExtractor      m_data_debug_ranges;
     lldb_private::DWARFDataExtractor      m_data_debug_str;
+    lldb_private::DWARFDataExtractor      m_data_debug_str_offsets;
     lldb_private::DWARFDataExtractor      m_data_apple_names;
     lldb_private::DWARFDataExtractor      m_data_apple_types;
     lldb_private::DWARFDataExtractor      m_data_apple_namespaces;

Modified: lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp Tue Aug 25 06:45:58 2015
@@ -142,17 +142,19 @@ SymbolVendorELF::CreateInstance (const l
 
                     static const SectionType g_sections[] =
                     {
-                        eSectionTypeDWARFDebugAranges,
-                        eSectionTypeDWARFDebugInfo,
                         eSectionTypeDWARFDebugAbbrev,
+                        eSectionTypeDWARFDebugAddr,
+                        eSectionTypeDWARFDebugAranges,
                         eSectionTypeDWARFDebugFrame,
+                        eSectionTypeDWARFDebugInfo,
                         eSectionTypeDWARFDebugLine,
-                        eSectionTypeDWARFDebugStr,
                         eSectionTypeDWARFDebugLoc,
                         eSectionTypeDWARFDebugMacInfo,
                         eSectionTypeDWARFDebugPubNames,
                         eSectionTypeDWARFDebugPubTypes,
                         eSectionTypeDWARFDebugRanges,
+                        eSectionTypeDWARFDebugStr,
+                        eSectionTypeDWARFDebugStrOffsets,
                         eSectionTypeELFSymbolTable,
                     };
                     for (size_t idx = 0; idx < sizeof(g_sections) / sizeof(g_sections[0]); ++idx)

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Tue Aug 25 06:45:58 2015
@@ -8883,7 +8883,7 @@ ClangASTContext::ParseTemplateDIE (Symbo
                     {
                         case DW_AT_name:
                             if (attributes.ExtractFormValueAtIndex(dwarf, i, form_value))
-                                name = form_value.AsCString(&dwarf->get_debug_str_data());
+                                name = form_value.AsCString(dwarf);
                             break;
 
                         case DW_AT_type:
@@ -9437,7 +9437,7 @@ ClangASTContext::ParseChildEnumerators (
                                 break;
 
                             case DW_AT_name:
-                                name = form_value.AsCString(&dwarf->get_debug_str_data());
+                                name = form_value.AsCString(dwarf);
                                 break;
 
                             case DW_AT_description:
@@ -9816,7 +9816,7 @@ ClangASTContext::ParseChildMembers (cons
                                 case DW_AT_decl_file:   decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(form_value.Unsigned())); break;
                                 case DW_AT_decl_line:   decl.SetLine(form_value.Unsigned()); break;
                                 case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break;
-                                case DW_AT_name:        name = form_value.AsCString(&dwarf->get_debug_str_data()); break;
+                                case DW_AT_name:        name = form_value.AsCString(dwarf); break;
                                 case DW_AT_type:        encoding_uid = form_value.Reference(); break;
                                 case DW_AT_bit_offset:  bit_offset = form_value.Unsigned(); break;
                                 case DW_AT_bit_size:    bit_size = form_value.Unsigned(); break;
@@ -9856,9 +9856,12 @@ ClangASTContext::ParseChildMembers (cons
 
                                 case DW_AT_accessibility: accessibility = DW_ACCESS_to_AccessType (form_value.Unsigned()); break;
                                 case DW_AT_artificial: is_artificial = form_value.Boolean(); break;
-                                case DW_AT_APPLE_property_name:      prop_name = form_value.AsCString(&dwarf->get_debug_str_data()); break;
-                                case DW_AT_APPLE_property_getter:    prop_getter_name = form_value.AsCString(&dwarf->get_debug_str_data()); break;
-                                case DW_AT_APPLE_property_setter:    prop_setter_name = form_value.AsCString(&dwarf->get_debug_str_data()); break;
+                                case DW_AT_APPLE_property_name:      prop_name = form_value.AsCString(dwarf);
+                                                                     break;
+                                case DW_AT_APPLE_property_getter:    prop_getter_name = form_value.AsCString(dwarf);
+                                                                     break;
+                                case DW_AT_APPLE_property_setter:    prop_setter_name = form_value.AsCString(dwarf);
+                                                                     break;
                                 case DW_AT_APPLE_property_attribute: prop_attributes = form_value.Unsigned(); break;
                                 case DW_AT_external:                 is_external = form_value.Boolean(); break;
 
@@ -10375,7 +10378,8 @@ ClangASTContext::ParseChildParameters (c
                                 case DW_AT_decl_file:   decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(form_value.Unsigned())); break;
                                 case DW_AT_decl_line:   decl.SetLine(form_value.Unsigned()); break;
                                 case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break;
-                                case DW_AT_name:        name = form_value.AsCString(&dwarf->get_debug_str_data()); break;
+                                case DW_AT_name:        name = form_value.AsCString(dwarf);
+                                                        break;
                                 case DW_AT_type:        param_type_die_offset = form_value.Reference(); break;
                                 case DW_AT_artificial:  is_artificial = form_value.Boolean(); break;
                                 case DW_AT_location:
@@ -10975,7 +10979,7 @@ ClangASTContext::ParseTypeFromDWARF (con
                                     case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break;
                                     case DW_AT_name:
 
-                                        type_name_cstr = form_value.AsCString(&dwarf->get_debug_str_data());
+                                        type_name_cstr = form_value.AsCString(dwarf);
                                         // Work around a bug in llvm-gcc where they give a name to a reference type which doesn't
                                         // include the "&"...
                                         if (tag == DW_TAG_reference_type)
@@ -11178,7 +11182,7 @@ ClangASTContext::ParseTypeFromDWARF (con
                                         break;
 
                                     case DW_AT_name:
-                                        type_name_cstr = form_value.AsCString(&dwarf->get_debug_str_data());
+                                        type_name_cstr = form_value.AsCString(dwarf);
                                         type_name_const_str.SetCString(type_name_cstr);
                                         break;
 
@@ -11575,7 +11579,7 @@ ClangASTContext::ParseTypeFromDWARF (con
                                     case DW_AT_decl_line:       decl.SetLine(form_value.Unsigned()); break;
                                     case DW_AT_decl_column:     decl.SetColumn(form_value.Unsigned()); break;
                                     case DW_AT_name:
-                                        type_name_cstr = form_value.AsCString(&dwarf->get_debug_str_data());
+                                        type_name_cstr = form_value.AsCString(dwarf);
                                         type_name_const_str.SetCString(type_name_cstr);
                                         break;
                                     case DW_AT_type:            encoding_uid = form_value.Reference(); break;
@@ -11693,7 +11697,7 @@ ClangASTContext::ParseTypeFromDWARF (con
                                     case DW_AT_decl_line:   decl.SetLine(form_value.Unsigned()); break;
                                     case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break;
                                     case DW_AT_name:
-                                        type_name_cstr = form_value.AsCString(&dwarf->get_debug_str_data());
+                                        type_name_cstr = form_value.AsCString(dwarf);
                                         type_name_const_str.SetCString(type_name_cstr);
                                         break;
 
@@ -12166,7 +12170,7 @@ ClangASTContext::ParseTypeFromDWARF (con
                                     case DW_AT_decl_line:   decl.SetLine(form_value.Unsigned()); break;
                                     case DW_AT_decl_column: decl.SetColumn(form_value.Unsigned()); break;
                                     case DW_AT_name:
-                                        type_name_cstr = form_value.AsCString(&dwarf->get_debug_str_data());
+                                        type_name_cstr = form_value.AsCString(dwarf);
                                         type_name_const_str.SetCString(type_name_cstr);
                                         break;
 

Modified: lldb/trunk/source/Symbol/ObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ObjectFile.cpp?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ObjectFile.cpp (original)
+++ lldb/trunk/source/Symbol/ObjectFile.cpp Tue Aug 25 06:45:58 2015
@@ -354,6 +354,7 @@ ObjectFile::GetAddressClass (addr_t file
                         return eAddressClassData;
                     case eSectionTypeDebug:
                     case eSectionTypeDWARFDebugAbbrev:
+                    case eSectionTypeDWARFDebugAddr:
                     case eSectionTypeDWARFDebugAranges:
                     case eSectionTypeDWARFDebugFrame:
                     case eSectionTypeDWARFDebugInfo:
@@ -364,6 +365,7 @@ ObjectFile::GetAddressClass (addr_t file
                     case eSectionTypeDWARFDebugPubTypes:
                     case eSectionTypeDWARFDebugRanges:
                     case eSectionTypeDWARFDebugStr:
+                    case eSectionTypeDWARFDebugStrOffsets:
                     case eSectionTypeDWARFAppleNames:
                     case eSectionTypeDWARFAppleTypes:
                     case eSectionTypeDWARFAppleNamespaces:

Modified: lldb/trunk/source/Utility/ConvertEnum.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ConvertEnum.cpp?rev=245931&r1=245930&r2=245931&view=diff
==============================================================================
--- lldb/trunk/source/Utility/ConvertEnum.cpp (original)
+++ lldb/trunk/source/Utility/ConvertEnum.cpp Tue Aug 25 06:45:58 2015
@@ -63,6 +63,8 @@ lldb_private::GetSectionTypeAsCString(ll
             return "objc-cfstrings";
         case eSectionTypeDWARFDebugAbbrev:
             return "dwarf-abbrev";
+        case eSectionTypeDWARFDebugAddr:
+            return "dwarf-addr";
         case eSectionTypeDWARFDebugAranges:
             return "dwarf-aranges";
         case eSectionTypeDWARFDebugFrame:
@@ -83,6 +85,8 @@ lldb_private::GetSectionTypeAsCString(ll
             return "dwarf-ranges";
         case eSectionTypeDWARFDebugStr:
             return "dwarf-str";
+        case eSectionTypeDWARFDebugStrOffsets:
+            return "dwarf-str-offsets";
         case eSectionTypeELFSymbolTable:
             return "elf-symbol-table";
         case eSectionTypeELFDynamicSymbols:




More information about the lldb-commits mailing list