debuggerd: IA version
Change-Id: I0c0d9c2d7e476b8d117aaf505a9480a47c0b5c05
Signed-off-by: Lei Li <lei.l.li@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
diff --git a/debuggerd/utility.c b/debuggerd/utility.c
index a9cbef7..2afdb46 100644
--- a/debuggerd/utility.c
+++ b/debuggerd/utility.c
@@ -69,11 +69,12 @@
/* Find the containing map info for the pc */
const mapinfo *pc_to_mapinfo(mapinfo *mi, unsigned pc, unsigned *rel_pc)
{
+ *rel_pc = pc;
while(mi) {
if((pc >= mi->start) && (pc < mi->end)){
// Only calculate the relative offset for shared libraries
if (strstr(mi->name, ".so")) {
- *rel_pc = pc - mi->start;
+ *rel_pc -= mi->start;
}
return mi;
}