int rtn_replace_probed_ex (lua_State *L) { RTN* v1 = check_rtn(L,1); PROBE_MODE v2 = lookup_string_to_probe_mode(L,lua_tostring(L,2)); AFUNPTR v3 = (VOID(*)())((UINT64)lua_tonumber(L,3)); AFUNPTR r = RTN_ReplaceProbedEx(*v1,v2,v3); lua_pushnumber(L, (UINT64)r); return 1; }
void Routine::replace_probed (PROBE_MODE mode) { typedef typename REPLACEMENT::funcptr_type funcptr_type; AFUNPTR funcptr = RTN_ReplaceProbedEx (this->rtn_, mode, AFUNPTR (REPLACEMENT::execute)); REPLACEMENT::original_funcptr (reinterpret_cast <funcptr_type> (funcptr)); }