diff options
Diffstat (limited to 'debuggerd/utility.c')
-rw-r--r-- | debuggerd/utility.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |