From 6cc492308712613cd23bee9240b1757428841a2f Mon Sep 17 00:00:00 2001 From: Bruce Beare Date: Wed, 13 Oct 2010 16:11:15 -0700 Subject: debuggerd: IA version Change-Id: I0c0d9c2d7e476b8d117aaf505a9480a47c0b5c05 Signed-off-by: Lei Li Signed-off-by: Bruce Beare --- debuggerd/utility.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'debuggerd/utility.c') diff --git a/debuggerd/utility.c b/debuggerd/utility.c index a9cbef79..2afdb46f 100644 --- a/debuggerd/utility.c +++ b/debuggerd/utility.c @@ -69,11 +69,12 @@ const char *map_to_name(mapinfo *mi, unsigned pc, const char* def) /* 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; } -- cgit v1.2.3