ART: Change the stack dump format to be in line with debuggerd
Make offsets 16 digits on 64-bit platforms.
Add the ability to provide the build fingerprint, and print it in
the traces output.
Bug: 22693991
(cherry picked from commit 242ae94dc39be53e519a6163ea1db494ceb75954)
Change-Id: Ibd3d3b3bd65dce84acfb97a487807d6f280a9508
diff --git a/runtime/signal_catcher.cc b/runtime/signal_catcher.cc
index 9f8c55c..6cb7950 100644
--- a/runtime/signal_catcher.cc
+++ b/runtime/signal_catcher.cc
@@ -133,8 +133,11 @@
DumpCmdLine(os);
- // Note: The string "ABI:" is chosen to match the format used by debuggerd.
- os << "ABI: " << GetInstructionSetString(runtime->GetInstructionSet()) << "\n";
+ // Note: The strings "Build fingerprint:" and "ABI:" are chosen to match the format used by
+ // debuggerd. This allows, for example, the stack tool to work.
+ std::string fingerprint = runtime->GetFingerprint();
+ os << "Build fingerprint: '" << (fingerprint.empty() ? "unknown" : fingerprint) << "'\n";
+ os << "ABI: '" << GetInstructionSetString(runtime->GetInstructionSet()) << "'\n";
os << "Build type: " << (kIsDebugBuild ? "debug" : "optimized") << "\n";