Merge "Update for SetProcessMemory removal."
This commit is contained in:
commit
ff331cf38c
2 changed files with 4 additions and 5 deletions
|
|
@ -73,14 +73,13 @@ static void debuggerd_fallback_trace(int output_fd, ucontext_t* ucontext) {
|
||||||
thread.registers.reset(
|
thread.registers.reset(
|
||||||
unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), ucontext));
|
unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), ucontext));
|
||||||
|
|
||||||
// TODO: Create this once and store it in a global?
|
|
||||||
unwindstack::UnwinderFromPid unwinder(kMaxFrames, getpid());
|
|
||||||
// Do not use the thread cache here because it will call pthread_key_create
|
// Do not use the thread cache here because it will call pthread_key_create
|
||||||
// which doesn't work in linker code. See b/189803009.
|
// which doesn't work in linker code. See b/189803009.
|
||||||
// Use a normal cached object because the process is stopped, and there
|
// Use a normal cached object because the process is stopped, and there
|
||||||
// is no chance of data changing between reads.
|
// is no chance of data changing between reads.
|
||||||
auto process_memory = unwindstack::Memory::CreateProcessMemoryCached(getpid());
|
auto process_memory = unwindstack::Memory::CreateProcessMemoryCached(getpid());
|
||||||
unwinder.SetProcessMemory(process_memory);
|
// TODO: Create this once and store it in a global?
|
||||||
|
unwindstack::UnwinderFromPid unwinder(kMaxFrames, getpid(), process_memory);
|
||||||
dump_backtrace_thread(output_fd, &unwinder, thread);
|
dump_backtrace_thread(output_fd, &unwinder, thread);
|
||||||
}
|
}
|
||||||
__linker_disable_fallback_allocator();
|
__linker_disable_fallback_allocator();
|
||||||
|
|
|
||||||
|
|
@ -101,10 +101,10 @@ void engrave_tombstone_ucontext(int tombstone_fd, int proto_fd, uint64_t abort_m
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unwindstack::UnwinderFromPid unwinder(kMaxFrames, pid, unwindstack::Regs::CurrentArch());
|
|
||||||
auto process_memory =
|
auto process_memory =
|
||||||
unwindstack::Memory::CreateProcessMemoryCached(getpid());
|
unwindstack::Memory::CreateProcessMemoryCached(getpid());
|
||||||
unwinder.SetProcessMemory(process_memory);
|
unwindstack::UnwinderFromPid unwinder(kMaxFrames, pid, unwindstack::Regs::CurrentArch(), nullptr,
|
||||||
|
process_memory);
|
||||||
if (!unwinder.Init()) {
|
if (!unwinder.Init()) {
|
||||||
async_safe_format_log(ANDROID_LOG_ERROR, LOG_TAG, "failed to init unwinder object");
|
async_safe_format_log(ANDROID_LOG_ERROR, LOG_TAG, "failed to init unwinder object");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue