summaryrefslogtreecommitdiffstats
path: root/libbacktrace/UnwindStack.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2017-09-06 14:35:35 -0700
committerJosh Gao <jmgao@google.com>2017-10-20 13:52:56 -0700
commit45c4a56f1d484ce60390bf48ab55076d4d601c9d (patch)
treed6401f8b6a85858c91af46cb6b282f3f1ac8cc50 /libbacktrace/UnwindStack.cpp
parentd72d92aee2d125f6a8d26932e6482bea5398b92c (diff)
downloadsystem_core-45c4a56f1d484ce60390bf48ab55076d4d601c9d.tar.gz
system_core-45c4a56f1d484ce60390bf48ab55076d4d601c9d.tar.bz2
system_core-45c4a56f1d484ce60390bf48ab55076d4d601c9d.zip
libbacktrace: expose libunwindstack Unwind routine.
Test: backtrace_test32/64 on hikey960 Change-Id: Iae6e342a8ffd13b4d5f76b39dd434c827f7a4d9e
Diffstat (limited to 'libbacktrace/UnwindStack.cpp')
-rw-r--r--libbacktrace/UnwindStack.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbacktrace/UnwindStack.cpp b/libbacktrace/UnwindStack.cpp
index 41153ce19..0f6730c8b 100644
--- a/libbacktrace/UnwindStack.cpp
+++ b/libbacktrace/UnwindStack.cpp
@@ -66,8 +66,8 @@ static std::string GetFunctionName(BacktraceMap* back_map, uintptr_t pc, uintptr
return name;
}
-static bool Unwind(unwindstack::Regs* regs, BacktraceMap* back_map,
- std::vector<backtrace_frame_data_t>* frames, size_t num_ignore_frames) {
+bool Backtrace::Unwind(unwindstack::Regs* regs, BacktraceMap* back_map,
+ std::vector<backtrace_frame_data_t>* frames, size_t num_ignore_frames) {
static std::set<std::string> skip_names{"libunwindstack.so", "libbacktrace.so"};
UnwindStackMap* stack_map = reinterpret_cast<UnwindStackMap*>(back_map);
auto process_memory = stack_map->process_memory();
@@ -127,7 +127,7 @@ bool UnwindStackCurrent::UnwindFromContext(size_t num_ignore_frames, ucontext_t*
}
error_ = BACKTRACE_UNWIND_NO_ERROR;
- return ::Unwind(regs.get(), GetMap(), &frames_, num_ignore_frames);
+ return Backtrace::Unwind(regs.get(), GetMap(), &frames_, num_ignore_frames);
}
UnwindStackPtrace::UnwindStackPtrace(pid_t pid, pid_t tid, BacktraceMap* map)
@@ -147,7 +147,7 @@ bool UnwindStackPtrace::Unwind(size_t num_ignore_frames, ucontext_t* context) {
}
error_ = BACKTRACE_UNWIND_NO_ERROR;
- return ::Unwind(regs.get(), GetMap(), &frames_, num_ignore_frames);
+ return Backtrace::Unwind(regs.get(), GetMap(), &frames_, num_ignore_frames);
}
Backtrace* Backtrace::CreateNew(pid_t pid, pid_t tid, BacktraceMap* map) {