diff options
author | Mike Hommey <mh@glandium.org> | 2018-06-01 15:39:13 +0900 |
---|---|---|
committer | Ted Mielczarek <ted.mielczarek@gmail.com> | 2018-06-19 10:44:10 +0000 |
commit | 69c2c51dd89965d234eec16e3a9353634831916b (patch) | |
tree | 91a41b0de567e6463400040dbb3cfa16c948de23 /src | |
parent | Avoid endl when writing symbol files (diff) | |
download | breakpad-69c2c51dd89965d234eec16e3a9353634831916b.tar.xz |
Fall back to the raw symbol name from DW_AT_MIPS_linkage_name when there is nothing else
When DW_AT_MIPS_linkage_name doesn't demangle, breakpad currently throws
the symbol completely, but in some cases, there is no DW_AT_name or
DW_AT_abstract_origin to figure out a name, and the raw value from
DW_AT_MIPS_linkage_name is still better than nothing. Fall back to that
in when there is nothing else.
R=ted@mielczarek.org
Change-Id: I5cc7580244f2b99f5f1f279d09b904031cae1a37
Reviewed-on: https://chromium-review.googlesource.com/1082176
Reviewed-by: Ted Mielczarek <ted.mielczarek@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/common/dwarf_cu_to_module.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc index a16bee7d..38fc4c16 100644 --- a/src/common/dwarf_cu_to_module.cc +++ b/src/common/dwarf_cu_to_module.cc @@ -285,6 +285,10 @@ class DwarfCUToModule::GenericDIEHandler: public dwarf2reader::DIEHandler { // string if the DIE has no such attribute or its content could not be // demangled. string demangled_name_; + + // The non-demangled value of the DW_AT_MIPS_linkage_name attribute, + // it its content count not be demangled. + string raw_name_; }; void DwarfCUToModule::GenericDIEHandler::ProcessAttributeUnsigned( @@ -362,6 +366,7 @@ void DwarfCUToModule::GenericDIEHandler::ProcessAttributeString( // fallthrough case Language::kDontDemangle: demangled_name_.clear(); + raw_name_ = AddStringToPool(data); break; } break; @@ -392,6 +397,8 @@ string DwarfCUToModule::GenericDIEHandler::ComputeQualifiedName() { unqualified_name = &name_attribute_; else if (specification_) unqualified_name = &specification_->unqualified_name; + else if (!raw_name_.empty()) + unqualified_name = &raw_name_; // Find the name of the enclosing context. If this DIE has a // specification, it's the specification's enclosing context that |