Skip to content
Snippets Groups Projects
Commit dcf95ac7 authored by Josh Gao's avatar Josh Gao Committed by The Android Automerger
Browse files

Don't demangle symbol names.

Bug: http://b/27299236
Change-Id: I26ef47f80d4d6048a316ba51e83365ff65d70439
parent 78aa5385
Branches
Tags android-6.0.1_r26 android-6.0.1_r27
No related merge requests found
...@@ -54,24 +54,8 @@ Backtrace::~Backtrace() { ...@@ -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 Backtrace::GetFunctionName(uintptr_t pc, uintptr_t* offset) {
std::string func_name = GetFunctionNameRaw(pc, 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; return func_name;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment