core/win32/syscall.c
/* Assumes mc is app state prior to system call.
 * Returns true iff system call is a callback return that does transfer control
 * (xref case 10579).
 */
Assumes mc is app state prior to system call.
Returns true iff system call is a callback return that does transfer control
(xref case 10579).
Assumes mc is app state prior to system call . Returns true iff system call is a callback return that does transfer control ( xref case 10579 ) .
bool
is_cb_return_syscall(dcontext_t *dcontext)
{
    dr_mcontext_t *mc = get_mcontext(dcontext);
    if (mc->xax == (reg_t) syscalls[SYS_CallbackReturn]) {
        reg_t *param_base = pre_system_call_param_base(mc);
        if ((NTSTATUS)sys_param(dcontext, param_base, 2) != STATUS_CALLBACK_POP_STACK)
            return true;
    }
    return false;
}
bool is_cb_return_syscall ( dcontext_t * dcontext ) { dr_mcontext_t * mc = get_mcontext ( dcontext ) ; if ( mc -> xax == ( reg_t ) syscalls [ SYS_CallbackReturn ] ) { reg_t * param_base = pre_system_call_param_base ( mc ) ; if ( ( NTSTATUS ) sys_param ( dcontext , param_base , 2 ) != STATUS_CALLBACK_POP_STACK ) return true ; } return false ; }
Assumes mc is app state prior to system call.
Assumes mc is app state prior to system call .