summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-12-08 00:24:40 +0000
committerGreg Clayton <gclayton@apple.com>2012-12-08 00:24:40 +0000
commit7141554858d2d857aab0ac15474a5a631efe526c (patch)
treef85370aafcb30a0ffbfcea0fe6e067efa9410835
parent65a6ee11dd4ccde80bf49e19bb7129b9a08296b9 (diff)
downloadbcm5719-llvm-7141554858d2d857aab0ac15474a5a631efe526c.tar.gz
bcm5719-llvm-7141554858d2d857aab0ac15474a5a631efe526c.zip
Make sure to check for DW_AT_linkage_name to get the mangled name in the DWARF along with the older DW_AT_MIPS_linkage_name attribute.
llvm-svn: 169657
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp1
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp6
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp1
-rw-r--r--lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp4
4 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
index 244b69d250a..9f594d45e8f 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
@@ -657,6 +657,7 @@ DWARFCompileUnit::Index (const uint32_t cu_idx,
// break;
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);
break;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
index 71c6c71e475..5411ee59bb4 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
@@ -798,6 +798,7 @@ DWARFDebugInfoEntry::GetDIENamesAndRanges
break;
case DW_AT_MIPS_linkage_name:
+ case DW_AT_linkage_name:
if (mangled == NULL)
mangled = form_value.AsCString(&dwarf2Data->get_debug_str_data());
break;
@@ -1488,6 +1489,9 @@ DWARFDebugInfoEntry::GetMangledName
if (GetAttributeValue(dwarf2Data, cu, DW_AT_MIPS_linkage_name, form_value))
name = form_value.AsCString(&dwarf2Data->get_debug_str_data());
+ if (GetAttributeValue(dwarf2Data, cu, DW_AT_linkage_name, form_value))
+ name = form_value.AsCString(&dwarf2Data->get_debug_str_data());
+
if (substitute_name_allowed && name == NULL)
{
if (GetAttributeValue(dwarf2Data, cu, DW_AT_name, form_value))
@@ -1518,6 +1522,8 @@ DWARFDebugInfoEntry::GetPubname
if (GetAttributeValue(dwarf2Data, cu, DW_AT_MIPS_linkage_name, form_value))
name = form_value.AsCString(&dwarf2Data->get_debug_str_data());
+ else if (GetAttributeValue(dwarf2Data, cu, DW_AT_linkage_name, form_value))
+ name = form_value.AsCString(&dwarf2Data->get_debug_str_data());
else if (GetAttributeValue(dwarf2Data, cu, DW_AT_name, form_value))
name = form_value.AsCString(&dwarf2Data->get_debug_str_data());
else if (GetAttributeValue(dwarf2Data, cu, DW_AT_specification, form_value))
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
index 4df4d2478c8..11e8d4c004d 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugPubnames.cpp
@@ -124,6 +124,7 @@ DWARFDebugPubnames::GeneratePubnames(SymbolFileDWARF* 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);
break;
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 453515f9645..e6e9a163e08 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -3274,6 +3274,8 @@ SymbolFileDWARF::FunctionDieMatchesPartialName (const DWARFDebugInfoEntry* die,
DWARFFormValue form_value;
die->GetAttributes(this, dwarf_cu, NULL, attributes);
uint32_t idx = attributes.FindAttributeIndex(DW_AT_MIPS_linkage_name);
+ if (idx == UINT32_MAX)
+ idx = attributes.FindAttributeIndex(DW_AT_linkage_name);
if (idx != UINT32_MAX)
{
if (attributes.ExtractFormValueAtIndex(this, idx, form_value))
@@ -6056,6 +6058,7 @@ SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu,
type_name_const_str.SetCString(type_name_cstr);
break;
+ case DW_AT_linkage_name:
case DW_AT_MIPS_linkage_name: break; // mangled = form_value.AsCString(&get_debug_str_data()); break;
case DW_AT_type: type_die_offset = form_value.Reference(dwarf_cu); break;
case DW_AT_accessibility: accessibility = DW_ACCESS_to_AccessType(form_value.Unsigned()); break;
@@ -6893,6 +6896,7 @@ SymbolFileDWARF::ParseVariableDIE
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_linkage_name:
case DW_AT_MIPS_linkage_name: mangled = form_value.AsCString(&get_debug_str_data()); break;
case DW_AT_type: type_uid = form_value.Reference(dwarf_cu); break;
case DW_AT_external: is_external = form_value.Unsigned() != 0; break;
OpenPOWER on IntegriCloud