diff options
author | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2006-01-22 01:12:51 +0000 |
---|---|---|
committer | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2006-01-22 01:12:51 +0000 |
commit | 3a384b30634e5310b59847974502997a0fdce4a1 (patch) | |
tree | 204ad73817b3c8aa85bc164304057b8b3c8a8713 /cachegrind/cg_main.c | |
parent | 6b0d5b32507e9a5316b1b70b316096a9181cf4ff (diff) | |
download | valgrind-3a384b30634e5310b59847974502997a0fdce4a1.tar.gz |
Index the BB_info table by redirected guest address, not
non-redirected guest address. This is a small but significant change
needed to make function wrapping work. The problem is that with
function wrapping two different translations are associated with the
non-redirected address (of a wrapped function entry point), and so
cachegrind asserts. Whereas the redirected guest addresses reflect
the reality of only one translation associated with each address. So
use them instead.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5582 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'cachegrind/cg_main.c')
-rw-r--r-- | cachegrind/cg_main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cachegrind/cg_main.c b/cachegrind/cg_main.c index 7fa516bb9..75d031f17 100644 --- a/cachegrind/cg_main.c +++ b/cachegrind/cg_main.c @@ -745,8 +745,9 @@ IRBB* cg_instrument ( VgCallbackClosure* closure, cia = st->Ist.IMark.addr; // Set up running state and get block info + tl_assert(closure->readdr == vge->base[0]); cgs.events_used = 0; - cgs.bbInfo = get_BB_info(bbIn, (Addr)closure->nraddr); + cgs.bbInfo = get_BB_info(bbIn, (Addr)closure->readdr); cgs.bbInfo_i = 0; if (DEBUG_CG) @@ -1231,7 +1232,7 @@ static void cg_discard_basic_block_info ( Addr64 orig_addr64, VexGuestExtents vge ) { BB_info* bbInfo; - Addr orig_addr = (Addr)orig_addr64; + Addr orig_addr = (Addr)vge.base[0]; tl_assert(vge.n_used > 0); |