|
From: Jakub B. <ber...@gm...> - 2016-10-21 21:26:46
|
Hello,
is it possible to pass more than 3 parameters to (dirty) helper calls
during instrumentation?
When I used VG_REGPARM(4), Valgrind crashed on assert that requires the
regparm count to be >=0 and <= 3 (I understand why is it so, it's probably
hard to pass more than 3 parameters in registers on x86 etc.).
I tried instead to create a vector of several integers and add it to the
argument vector, but Valgrind didn't like that either (it crashed during
ppIRExpr).
// this didn't work
IRExpr** args = mkIRExprVec_3(
mkIRExpr_HWord(exprType),
addr,
mkIRExprVec_2(mkIRExpr_HWord(i1), mkIRExpr_HWord(i2))
);
IRDirty* di = unsafeIRDirty_0_N(3, name, VG_(fnptr_to_fnentry)(fn), args);
Am I doing it wrong or is this something that is not supported at all in
Valgrind?
Thanks,
Kuba Beranek
|