summaryrefslogtreecommitdiff
path: root/libbacktrace/UnwindStack.cpp
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-08-26 00:02:46 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-08-26 00:02:46 +0000
commit75a40988c0e7a35f2663b644989ce012b66f4586 (patch)
tree2e40cac43676143ffa2d2793fdc87aa7ee5807e4 /libbacktrace/UnwindStack.cpp
parent54a28300b790dbbb165563bca0720939b5157864 (diff)
parent0953ecd03a90350117d6881c55959c6644972b79 (diff)
Merge "libunwindstack: make machine type a property of Regs."
Diffstat (limited to 'libbacktrace/UnwindStack.cpp')
-rw-r--r--libbacktrace/UnwindStack.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/libbacktrace/UnwindStack.cpp b/libbacktrace/UnwindStack.cpp
index e79bca314..3b2f38e08 100644
--- a/libbacktrace/UnwindStack.cpp
+++ b/libbacktrace/UnwindStack.cpp
@@ -160,7 +160,8 @@ bool UnwindStackCurrent::UnwindFromContext(size_t num_ignore_frames, ucontext_t*
// one extra function call appearing in the unwind.
unwindstack::RegsGetLocal(regs.get());
} else {
- regs.reset(unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::GetMachineType(), ucontext));
+ regs.reset(
+ unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentMachineType(), ucontext));
}
error_ = BACKTRACE_UNWIND_NO_ERROR;
@@ -177,10 +178,10 @@ std::string UnwindStackPtrace::GetFunctionNameRaw(uintptr_t pc, uintptr_t* offse
bool UnwindStackPtrace::Unwind(size_t num_ignore_frames, ucontext_t* context) {
std::unique_ptr<unwindstack::Regs> regs;
if (context == nullptr) {
- uint32_t machine_type;
- regs.reset(unwindstack::Regs::RemoteGet(Tid(), &machine_type));
+ regs.reset(unwindstack::Regs::RemoteGet(Tid()));
} else {
- regs.reset(unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::GetMachineType(), context));
+ regs.reset(
+ unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentMachineType(), context));
}
error_ = BACKTRACE_UNWIND_NO_ERROR;