From ad54cfed4516292654c997910839153264ae00a0 Mon Sep 17 00:00:00 2001 From: Josh Gao Date: Wed, 23 Mar 2016 11:42:53 -0700 Subject: Don't demangle symbol names. Bug: http://b/27299236 Change-Id: I26ef47f80d4d6048a316ba51e83365ff65d70439 --- libbacktrace/Backtrace.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/libbacktrace/Backtrace.cpp b/libbacktrace/Backtrace.cpp index 97f0ef4..42769ed 100644 --- a/libbacktrace/Backtrace.cpp +++ b/libbacktrace/Backtrace.cpp @@ -54,24 +54,8 @@ Backtrace::~Backtrace() { } } -extern "C" char* __cxa_demangle(const char* mangled, char* buf, size_t* len, - int* status); - std::string Backtrace::GetFunctionName(uintptr_t pc, uintptr_t* offset) { std::string func_name = GetFunctionNameRaw(pc, offset); - if (!func_name.empty()) { -#if defined(__APPLE__) - // Mac OS' __cxa_demangle demangles "f" as "float"; last tested on 10.7. - if (func_name[0] != '_') { - return func_name; - } -#endif - char* name = __cxa_demangle(func_name.c_str(), 0, 0, 0); - if (name) { - func_name = name; - free(name); - } - } return func_name; } -- cgit v1.1