summaryrefslogtreecommitdiffstats
path: root/runtime/utils.cc
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2015-05-01 16:03:49 -0700
committerChristopher Ferris <cferris@google.com>2015-05-01 16:31:31 -0700
commit332ef327c2b1a5e1774ba0d1da23e07303002af9 (patch)
tree8faa5f4355988997d756168377d32be8b18614d2 /runtime/utils.cc
parent8b83b55de8abbc195c038789f1034107f4974597 (diff)
downloadart-332ef327c2b1a5e1774ba0d1da23e07303002af9.tar.gz
art-332ef327c2b1a5e1774ba0d1da23e07303002af9.tar.bz2
art-332ef327c2b1a5e1774ba0d1da23e07303002af9.zip
Let the map function compute the relative pc.
The new packed relocations linker option creates an elf with a non-zero load base. It's no longer an easy task to compute the relative pc yourself so call the helper function to do it for us. Bug: 20687795 Change-Id: If11c1a596bc79382d44e35a86d5035ab29d29864
Diffstat (limited to 'runtime/utils.cc')
-rw-r--r--runtime/utils.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/utils.cc b/runtime/utils.cc
index ec7131dd2..e18af0069 100644
--- a/runtime/utils.cc
+++ b/runtime/utils.cc
@@ -1298,7 +1298,7 @@ void DumpNativeStack(std::ostream& os, pid_t tid, const char* prefix,
if (!BacktraceMap::IsValid(it->map)) {
os << StringPrintf("%08" PRIxPTR " ???", it->pc);
} else {
- os << StringPrintf("%08" PRIxPTR " ", it->pc - it->map.start);
+ os << StringPrintf("%08" PRIxPTR " ", BacktraceMap::GetRelativePc(it->map, it->pc));
os << it->map.name;
os << " (";
if (!it->func_name.empty()) {