Don't demangle symbol names.
Bug: http://b/27299236 Change-Id: I3a698c6d93e262fd78e743c1e6e946b054b9dcd1
This commit is contained in:
parent
1eb6ec56c2
commit
7c903fbacf
1 changed files with 0 additions and 16 deletions
|
|
@ -60,24 +60,8 @@ bool Backtrace::Unwind(size_t num_ignore_frames, ucontext_t* ucontext) {
|
|||
return impl_->Unwind(num_ignore_frames, ucontext);
|
||||
}
|
||||
|
||||
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 = impl_->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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue