Bug 1464537 - Add support for DWARF 4 DW_AT_linkage_name. r?ted
--- a/toolkit/crashreporter/google-breakpad/src/common/dwarf/dwarf2enums.h
+++ b/toolkit/crashreporter/google-breakpad/src/common/dwarf/dwarf2enums.h
@@ -227,16 +227,18 @@ enum DwarfAttribute {
DW_AT_entry_pc = 0x52,
DW_AT_use_UTF8 = 0x53,
DW_AT_extension = 0x54,
DW_AT_ranges = 0x55,
DW_AT_trampoline = 0x56,
DW_AT_call_column = 0x57,
DW_AT_call_file = 0x58,
DW_AT_call_line = 0x59,
+ // DWARF 4 values.
+ DW_AT_linkage_name = 0x6e,
// SGI/MIPS extensions.
DW_AT_MIPS_fde = 0x2001,
DW_AT_MIPS_loop_begin = 0x2002,
DW_AT_MIPS_tail_loop_begin = 0x2003,
DW_AT_MIPS_epilog_begin = 0x2004,
DW_AT_MIPS_loop_unroll_factor = 0x2005,
DW_AT_MIPS_software_pipeline_depth = 0x2006,
DW_AT_MIPS_linkage_name = 0x2007,
--- a/toolkit/crashreporter/google-breakpad/src/common/dwarf_cu_to_module.cc
+++ b/toolkit/crashreporter/google-breakpad/src/common/dwarf_cu_to_module.cc
@@ -345,16 +345,17 @@ string DwarfCUToModule::GenericDIEHandle
void DwarfCUToModule::GenericDIEHandler::ProcessAttributeString(
enum DwarfAttribute attr,
enum DwarfForm form,
const string &data) {
switch (attr) {
case dwarf2reader::DW_AT_name:
name_attribute_ = AddStringToPool(data);
break;
+ case dwarf2reader::DW_AT_linkage_name:
case dwarf2reader::DW_AT_MIPS_linkage_name: {
char* demangled = NULL;
int status = -1;
#if !defined(__ANDROID__) // Android NDK doesn't provide abi::__cxa_demangle.
demangled = abi::__cxa_demangle(data.c_str(), NULL, NULL, &status);
#endif
if (status != 0) {
cu_context_->reporter->DemangleError(data, status);