diff options
author | Ted Mielczarek <ted@mielczarek.org> | 2016-10-24 15:16:28 -0400 |
---|---|---|
committer | Ted Mielczarek <ted@mielczarek.org> | 2016-10-25 10:43:00 +0000 |
commit | 2ecb2baba829a7ed4fff4bc60edf0c1643dc129c (patch) | |
tree | 4106bbadd878c7148c9393e33d5bf5cbb3024f2b /src/common/dwarf_cu_to_module.cc | |
parent | Fix iterating over the MDXStateFeature entries on 32-bit hosts (diff) | |
download | breakpad-2ecb2baba829a7ed4fff4bc60edf0c1643dc129c.tar.xz |
Don't demangle Rust symbols by default, but allow linking to rust-demangle.
The Rust compiler uses GCC C++ name mangling, but it has another layer of
encoding so abi::cxa_demangle doesn't produce great results. This patch
changes dump_syms to dump unmangled names by default so that consumers can
demangle them after-the-fact.
It also adds a tiny bit of support for linking against a Rust library I wrote
that can demangle Rust symbols nicely:
https://github.com/luser/rust-demangle-capi
BUG=
Change-Id: I63a425035ebb7ac516f067fed2aa782849ea9604
Reviewed-on: https://chromium-review.googlesource.com/402308
Reviewed-by: Mark Mentovai <mark@chromium.org>
Diffstat (limited to 'src/common/dwarf_cu_to_module.cc')
-rw-r--r-- | src/common/dwarf_cu_to_module.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc index 100f3962..8d874366 100644 --- a/src/common/dwarf_cu_to_module.cc +++ b/src/common/dwarf_cu_to_module.cc @@ -777,6 +777,10 @@ void DwarfCUToModule::SetLanguage(DwarfLanguage language) { cu_context_->language = Language::Swift; break; + case dwarf2reader::DW_LANG_Rust: + cu_context_->language = Language::Rust; + break; + // DWARF has no generic language code for assembly language; this is // what the GNU toolchain uses. case dwarf2reader::DW_LANG_Mips_Assembler: |