Loading debuggerd/crash_dump.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ #define ATRACE_TAG ATRACE_TAG_BIONIC #include <utils/Trace.h> #include <unwindstack/DexFiles.h> #include <unwindstack/JitDebug.h> #include <unwindstack/Maps.h> #include <unwindstack/Memory.h> Loading Loading @@ -566,7 +567,7 @@ int main(int argc, char** argv) { // TODO: Use seccomp to lock ourselves down. unwindstack::UnwinderFromPid unwinder(256, vm_pid); if (!unwinder.Init()) { if (!unwinder.Init(unwindstack::Regs::CurrentArch())) { LOG(FATAL) << "Failed to init unwinder object."; } Loading debuggerd/handler/debuggerd_fallback.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ #include <android-base/file.h> #include <android-base/unique_fd.h> #include <async_safe/log.h> #include <unwindstack/DexFiles.h> #include <unwindstack/JitDebug.h> #include <unwindstack/Maps.h> #include <unwindstack/Memory.h> Loading Loading @@ -80,12 +81,12 @@ static void debuggerd_fallback_trace(int output_fd, ucontext_t* ucontext) { thread.pid = getpid(); thread.tid = gettid(); thread.thread_name = get_thread_name(gettid()); thread.registers.reset( unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), ucontext)); unwindstack::ArchEnum arch = unwindstack::Regs::CurrentArch(); thread.registers.reset(unwindstack::Regs::CreateFromUcontext(arch, ucontext)); // TODO: Create this once and store it in a global? unwindstack::UnwinderFromPid unwinder(kMaxFrames, getpid()); if (unwinder.Init()) { if (unwinder.Init(arch)) { dump_backtrace_thread(output_fd, &unwinder, thread); } else { async_safe_format_log(ANDROID_LOG_ERROR, "libc", "Unable to init unwinder."); Loading debuggerd/libdebuggerd/tombstone.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ #include <log/log.h> #include <log/logprint.h> #include <private/android_filesystem_config.h> #include <unwindstack/DexFiles.h> #include <unwindstack/JitDebug.h> #include <unwindstack/Maps.h> #include <unwindstack/Memory.h> Loading Loading @@ -649,7 +650,7 @@ void engrave_tombstone_ucontext(int tombstone_fd, uint64_t abort_msg_address, si }; unwindstack::UnwinderFromPid unwinder(kMaxFrames, pid); if (!unwinder.Init()) { if (!unwinder.Init(unwindstack::Regs::CurrentArch())) { LOG(FATAL) << "Failed to init unwinder object."; } Loading libbacktrace/UnwindStack.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,9 @@ #include <unwindstack/Regs.h> #include <unwindstack/RegsGetLocal.h> #if !defined(NO_LIBDEXFILE_SUPPORT) #include <unwindstack/DexFiles.h> #endif #include <unwindstack/Unwinder.h> #include "BacktraceLog.h" Loading @@ -47,6 +50,14 @@ bool Backtrace::Unwind(unwindstack::Regs* regs, BacktraceMap* back_map, regs, stack_map->process_memory()); unwinder.SetResolveNames(stack_map->ResolveNames()); stack_map->SetArch(regs->Arch()); if (stack_map->GetJitDebug() != nullptr) { unwinder.SetJitDebug(stack_map->GetJitDebug(), regs->Arch()); } #if !defined(NO_LIBDEXFILE_SUPPORT) if (stack_map->GetDexFiles() != nullptr) { unwinder.SetDexFiles(stack_map->GetDexFiles(), regs->Arch()); } #endif unwinder.Unwind(skip_names, &stack_map->GetSuffixesToIgnore()); if (error != nullptr) { switch (unwinder.LastErrorCode()) { Loading libbacktrace/UnwindStackMap.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,13 @@ bool UnwindStackMap::Build() { // Create the process memory object. process_memory_ = unwindstack::Memory::CreateProcessMemory(pid_); // Create a JitDebug object for getting jit unwind information. std::vector<std::string> search_libs_{"libart.so", "libartd.so"}; jit_debug_.reset(new unwindstack::JitDebug(process_memory_, search_libs_)); #if !defined(NO_LIBDEXFILE_SUPPORT) dex_files_.reset(new unwindstack::DexFiles(process_memory_, search_libs_)); #endif if (!stack_maps_->Parse()) { return false; } Loading Loading
debuggerd/crash_dump.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -48,6 +48,7 @@ #define ATRACE_TAG ATRACE_TAG_BIONIC #include <utils/Trace.h> #include <unwindstack/DexFiles.h> #include <unwindstack/JitDebug.h> #include <unwindstack/Maps.h> #include <unwindstack/Memory.h> Loading Loading @@ -566,7 +567,7 @@ int main(int argc, char** argv) { // TODO: Use seccomp to lock ourselves down. unwindstack::UnwinderFromPid unwinder(256, vm_pid); if (!unwinder.Init()) { if (!unwinder.Init(unwindstack::Regs::CurrentArch())) { LOG(FATAL) << "Failed to init unwinder object."; } Loading
debuggerd/handler/debuggerd_fallback.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ #include <android-base/file.h> #include <android-base/unique_fd.h> #include <async_safe/log.h> #include <unwindstack/DexFiles.h> #include <unwindstack/JitDebug.h> #include <unwindstack/Maps.h> #include <unwindstack/Memory.h> Loading Loading @@ -80,12 +81,12 @@ static void debuggerd_fallback_trace(int output_fd, ucontext_t* ucontext) { thread.pid = getpid(); thread.tid = gettid(); thread.thread_name = get_thread_name(gettid()); thread.registers.reset( unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), ucontext)); unwindstack::ArchEnum arch = unwindstack::Regs::CurrentArch(); thread.registers.reset(unwindstack::Regs::CreateFromUcontext(arch, ucontext)); // TODO: Create this once and store it in a global? unwindstack::UnwinderFromPid unwinder(kMaxFrames, getpid()); if (unwinder.Init()) { if (unwinder.Init(arch)) { dump_backtrace_thread(output_fd, &unwinder, thread); } else { async_safe_format_log(ANDROID_LOG_ERROR, "libc", "Unable to init unwinder."); Loading
debuggerd/libdebuggerd/tombstone.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ #include <log/log.h> #include <log/logprint.h> #include <private/android_filesystem_config.h> #include <unwindstack/DexFiles.h> #include <unwindstack/JitDebug.h> #include <unwindstack/Maps.h> #include <unwindstack/Memory.h> Loading Loading @@ -649,7 +650,7 @@ void engrave_tombstone_ucontext(int tombstone_fd, uint64_t abort_msg_address, si }; unwindstack::UnwinderFromPid unwinder(kMaxFrames, pid); if (!unwinder.Init()) { if (!unwinder.Init(unwindstack::Regs::CurrentArch())) { LOG(FATAL) << "Failed to init unwinder object."; } Loading
libbacktrace/UnwindStack.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,9 @@ #include <unwindstack/Regs.h> #include <unwindstack/RegsGetLocal.h> #if !defined(NO_LIBDEXFILE_SUPPORT) #include <unwindstack/DexFiles.h> #endif #include <unwindstack/Unwinder.h> #include "BacktraceLog.h" Loading @@ -47,6 +50,14 @@ bool Backtrace::Unwind(unwindstack::Regs* regs, BacktraceMap* back_map, regs, stack_map->process_memory()); unwinder.SetResolveNames(stack_map->ResolveNames()); stack_map->SetArch(regs->Arch()); if (stack_map->GetJitDebug() != nullptr) { unwinder.SetJitDebug(stack_map->GetJitDebug(), regs->Arch()); } #if !defined(NO_LIBDEXFILE_SUPPORT) if (stack_map->GetDexFiles() != nullptr) { unwinder.SetDexFiles(stack_map->GetDexFiles(), regs->Arch()); } #endif unwinder.Unwind(skip_names, &stack_map->GetSuffixesToIgnore()); if (error != nullptr) { switch (unwinder.LastErrorCode()) { Loading
libbacktrace/UnwindStackMap.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,13 @@ bool UnwindStackMap::Build() { // Create the process memory object. process_memory_ = unwindstack::Memory::CreateProcessMemory(pid_); // Create a JitDebug object for getting jit unwind information. std::vector<std::string> search_libs_{"libart.so", "libartd.so"}; jit_debug_.reset(new unwindstack::JitDebug(process_memory_, search_libs_)); #if !defined(NO_LIBDEXFILE_SUPPORT) dex_files_.reset(new unwindstack::DexFiles(process_memory_, search_libs_)); #endif if (!stack_maps_->Parse()) { return false; } Loading