pub unsafe extern "C" fn drwrap_redirect_execution(
wrapcxt: *mut c_void,
) -> drext_status_tExpand description
May only be called from a drwrap_wrap() post-function callback. Redirects execution to the \p pc specified in the #dr_mcontext_t of the \p wrapcxt after executing all remaining post-function callbacks. Automatically calls \p drwrap_set_mcontext to make the redirection to \p pc effective; calls to drwrap_set_mcontext() from subsequent post-function callbacks will be denied to prevent clobbering the redirection mcontext. Redirecting execution from nested invocations of a recursive function is not supported.
\note It is the client’s responsibility to adjust the register state and/or memory to accommodate the redirection target; otherwise the application may behave in unexpected ways. If the client intends to repeat execution of the wrapped function, the stack pointer must be adjusted accordingly during the post-function callback so that the correct return address is in the conventional location before execution enters the wrapped function. This is necessary because the pre-function callback occurs at the beginning of the wrapped function (i.e., after the call instruction has executed), while the post-function callback occurs after the return instruction has executed (as if inserted following the call instruction).
\return DREXT_SUCCESS if the redirect request is accepted; DREXT_ERROR_STATE_INCOMPATIBLE if this function was called outside of a post-function callback, or DREXT_ERROR if the redirect could not be fulfilled for any other reason.