From: Julian S. <js...@ac...> - 2008-04-05 20:32:56
|
> for each statement s in the IRBB > if s is an Ist_Store > then > insert helper function with argument s->Ist.Store.data > endif > > if s is an Ist_Tmp > then > if tag of IRExpr in s->Ist.Tmp.Data is Iex_Load > insert helper function with argument s->Ist.Tmp.tmp > endif > end To get 100% coverage, you also need to handle Ist_Dirty, which is tricky. > * Issue: The VEX core only handles arguments of type Ity_I32 passed to > helper functions. [...] > Solution 1: at instrumentation time, use the tyenv array in the basic block > to check > the type of the temporary variable tX . If tX is not Ity_I32, insert a new > IRStmt which allocates a new temporary tZ and inserts a conversion from the > type of tX to Ity_I32, then inserts a call to checkValueAndPrintST(tZ). I > have not actually done this, but it "should work." Yes - it's by far the simplest solution, and is used in various tools. Basically widen the arg using Iop_{1,8,16}Uto32 before handing it to the helper call. J |