summaryrefslogtreecommitdiff
path: root/debuggerd/libdebuggerd/tombstone.cpp
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2020-09-28 20:33:51 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-09-28 20:33:51 +0000
commit96e73d573e09dd8cb0afb1205ca7df1f0c20fa98 (patch)
tree1f139a357de89063c2ca58754f583de61797e456 /debuggerd/libdebuggerd/tombstone.cpp
parent75766694c2969fc87ae2ab81733894d659e80947 (diff)
parent06c5c6958ad9455b579b7b29c0fc881adec573cc (diff)
Merge "Add arch member into Unwinder object." am: 087552a89b am: 89f54f6f86 am: d232e3c435 am: 0bd4f2dfc1 am: 06c5c6958a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1437275 Change-Id: I5c48e2558686db96b082d0d334a97c24f4296037
Diffstat (limited to 'debuggerd/libdebuggerd/tombstone.cpp')
-rw-r--r--debuggerd/libdebuggerd/tombstone.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/debuggerd/libdebuggerd/tombstone.cpp b/debuggerd/libdebuggerd/tombstone.cpp
index e1fe82b6d9..d88c5a93d1 100644
--- a/debuggerd/libdebuggerd/tombstone.cpp
+++ b/debuggerd/libdebuggerd/tombstone.cpp
@@ -407,7 +407,11 @@ static bool dump_thread(log_t* log, unwindstack::Unwinder* unwinder, const Threa
unwinder->SetRegs(regs_copy.get());
unwinder->Unwind();
if (unwinder->NumFrames() == 0) {
- _LOG(log, logtype::THREAD, "Failed to unwind");
+ _LOG(log, logtype::THREAD, "Failed to unwind\n");
+ if (unwinder->LastErrorCode() != unwindstack::ERROR_NONE) {
+ _LOG(log, logtype::THREAD, " Error code: %s\n", unwinder->LastErrorCodeString());
+ _LOG(log, logtype::THREAD, " Error address: 0x%" PRIx64 "\n", unwinder->LastErrorAddress());
+ }
} else {
_LOG(log, logtype::BACKTRACE, "\nbacktrace:\n");
log_backtrace(log, unwinder, " ");
@@ -578,8 +582,8 @@ void engrave_tombstone_ucontext(int tombstone_fd, uint64_t abort_msg_address, si
.siginfo = siginfo,
};
- unwindstack::UnwinderFromPid unwinder(kMaxFrames, pid);
- if (!unwinder.Init(unwindstack::Regs::CurrentArch())) {
+ unwindstack::UnwinderFromPid unwinder(kMaxFrames, pid, unwindstack::Regs::CurrentArch());
+ if (!unwinder.Init()) {
LOG(FATAL) << "Failed to init unwinder object.";
}