Merge "Add demangling of function name."
am: 6452b9036d
Change-Id: I7a2b883afb4fca2e8ce754b3bcea867ed0779c5b
This commit is contained in:
commit
e10835f28a
1 changed files with 4 additions and 1 deletions
|
@ -29,6 +29,7 @@
|
|||
#endif
|
||||
|
||||
#include <backtrace/Backtrace.h>
|
||||
#include <demangle.h>
|
||||
#include <unwindstack/Elf.h>
|
||||
#include <unwindstack/MapInfo.h>
|
||||
#include <unwindstack/Maps.h>
|
||||
|
@ -110,7 +111,9 @@ static bool Unwind(pid_t pid, unwindstack::Memory* memory, unwindstack::Regs* re
|
|||
frame->map.name = map_info->name;
|
||||
|
||||
uint64_t func_offset = 0;
|
||||
if (!elf->GetFunctionName(adjusted_rel_pc, &frame->func_name, &func_offset)) {
|
||||
if (elf->GetFunctionName(adjusted_rel_pc, &frame->func_name, &func_offset)) {
|
||||
frame->func_name = demangle(frame->func_name.c_str());
|
||||
} else {
|
||||
frame->func_name = "";
|
||||
}
|
||||
frame->func_offset = func_offset;
|
||||
|
|
Loading…
Reference in a new issue