Don\'t demangle symbol names. am: fbbc744

am: 0edda64

* commit '0edda648fb7793c58ff76ceb0c740571b25d16fd':
  Don't demangle symbol names.
This commit is contained in:
Josh Gao 2016-03-23 20:44:20 +00:00 committed by android-build-merger
commit 9bf0b815ad
1 changed files with 0 additions and 16 deletions

View File

@ -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;
}