|
From: Felix R. <fe...@kn...> - 2017-08-21 13:12:44
|
Hi everybody
I am trying to make a simple pass-through tool, in which BB's are
just copied. I am using valgrind 3.13.0, and this is the code I have in
my tool. Can somebody give me a hand?
Thank you!
Felix
static IRSB *my_instrument (VgCallbackClosure *closure, IRSB *bbIn,
const VexGuestLayout *layout, const VexGuestExtents *vge, const
VexArchInfo * vai, const IRType gWordTy, IRType hWordTy)
{
IRSB *bbOut = emptyIRSB ();
bbOut->tyenv = deepCopyIRTypeEnv (bbIn->tyenv);
bbOut->next = deepCopyIRExpr (bbIn->next);
bbOut->jumpkind = bbIn->jumpkind;
for (Int i = 0; i < bbIn->stmts_used; ++i)
{
IRStmt* const st = bbIn->stmts[i];
addStmtToIRSB(bbOut, st);
}
return bbOut;
}
|