From 332ef327c2b1a5e1774ba0d1da23e07303002af9 Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Fri, 1 May 2015 16:03:49 -0700 Subject: 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 --- runtime/utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/utils.cc') 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()) { -- cgit v1.2.3