diff options
author | Andreas Gampe <agampe@google.com> | 2015-07-23 14:37:18 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2015-07-23 16:49:07 -0700 |
commit | 242ae94dc39be53e519a6163ea1db494ceb75954 (patch) | |
tree | 00188ca7b37a606c983fb733a79fba75e8fbe001 /runtime/utils.cc | |
parent | be86eabe578df433f46055bae08e77314a661d49 (diff) | |
download | art-242ae94dc39be53e519a6163ea1db494ceb75954.tar.gz art-242ae94dc39be53e519a6163ea1db494ceb75954.tar.bz2 art-242ae94dc39be53e519a6163ea1db494ceb75954.zip |
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
Change-Id: Ibd3d3b3bd65dce84acfb97a487807d6f280a9508
Diffstat (limited to 'runtime/utils.cc')
-rw-r--r-- | runtime/utils.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/runtime/utils.cc b/runtime/utils.cc index 4923342e8..80938cea1 100644 --- a/runtime/utils.cc +++ b/runtime/utils.cc @@ -1130,9 +1130,13 @@ void DumpNativeStack(std::ostream& os, pid_t tid, const char* prefix, os << prefix << StringPrintf("#%02zu pc ", it->num); bool try_addr2line = false; if (!BacktraceMap::IsValid(it->map)) { - os << StringPrintf("%08" PRIxPTR " ???", it->pc); + os << StringPrintf(Is64BitInstructionSet(kRuntimeISA) ? "%016" PRIxPTR " ???" + : "%08" PRIxPTR " ???", + it->pc); } else { - os << StringPrintf("%08" PRIxPTR " ", BacktraceMap::GetRelativePc(it->map, it->pc)); + os << StringPrintf(Is64BitInstructionSet(kRuntimeISA) ? "%016" PRIxPTR " " + : "%08" PRIxPTR " ", + BacktraceMap::GetRelativePc(it->map, it->pc)); os << it->map.name; os << " ("; if (!it->func_name.empty()) { |