summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Christopher Ferris <cferris@google.com> 2016-03-09 16:03:00 -0800
committer Christopher Ferris <cferris@google.com> 2016-03-10 11:33:39 -0800
commitf193878a242f5b86db62986a9b2cba5d99505c17 (patch)
tree006fa6ec8d30c4d43bf9120964527ff087ef3292
parent2048b01dfec8877d672a4da41a158f68b12b5337 (diff)
Log when why an Unwind failed.
Bug: 27449879 Change-Id: If7ae5f0991da6fd64dd45e22d69eecef1388a28e
-rw-r--r--runtime/utils.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/utils.cc b/runtime/utils.cc
index 13564a6a0f..472a85c042 100644
--- a/runtime/utils.cc
+++ b/runtime/utils.cc
@@ -1120,7 +1120,8 @@ void DumpNativeStack(std::ostream& os, pid_t tid, BacktraceMap* existing_map, co
}
std::unique_ptr<Backtrace> backtrace(Backtrace::Create(BACKTRACE_CURRENT_PROCESS, tid, map));
if (!backtrace->Unwind(0, reinterpret_cast<ucontext*>(ucontext_ptr))) {
- os << prefix << "(backtrace::Unwind failed for thread " << tid << ")\n";
+ os << prefix << "(backtrace::Unwind failed for thread " << tid
+ << ": " << backtrace->GetErrorString(backtrace->GetError()) << ")\n";
return;
} else if (backtrace->NumFrames() == 0) {
os << prefix << "(no native stack frames for thread " << tid << ")\n";