|
From: <sv...@va...> - 2006-01-22 01:12:56
|
Author: sewardj
Date: 2006-01-22 01:12:51 +0000 (Sun, 22 Jan 2006)
New Revision: 5582
Log:
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.
Modified:
trunk/cachegrind/cg_main.c
Modified: trunk/cachegrind/cg_main.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/cg_main.c 2006-01-22 01:10:12 UTC (rev 5581)
+++ trunk/cachegrind/cg_main.c 2006-01-22 01:12:51 UTC (rev 5582)
@@ -745,8 +745,9 @@
cia =3D st->Ist.IMark.addr;
=20
// Set up running state and get block info
+ tl_assert(closure->readdr =3D=3D vge->base[0]);
cgs.events_used =3D 0;
- cgs.bbInfo =3D get_BB_info(bbIn, (Addr)closure->nraddr);
+ cgs.bbInfo =3D get_BB_info(bbIn, (Addr)closure->readdr);
cgs.bbInfo_i =3D 0;
=20
if (DEBUG_CG)
@@ -1231,7 +1232,7 @@
void cg_discard_basic_block_info ( Addr64 orig_addr64, VexGuestExtents v=
ge )
{
BB_info* bbInfo;
- Addr orig_addr =3D (Addr)orig_addr64;
+ Addr orig_addr =3D (Addr)vge.base[0];
=20
tl_assert(vge.n_used > 0);
=20
|