use trap4 as an anchor to redirect simulator call to native function.