Skip to main content

dr_syscall_set_result

Function dr_syscall_set_result 

Source
pub unsafe extern "C" fn dr_syscall_set_result(
    drcontext: *mut c_void,
    value: reg_t,
)
Expand description

Usable only from a pre-syscall (dr_register_pre_syscall_event()) or post-syscall (dr_register_post_syscall_event()) event. For pre-syscall, should only be used when skipping the system call. This sets the return value of the system call that the application sees to \p value.

\note On MacOS, do not use this function as it fails to set the carry flag and thus fails to properly indicate whether the system call succeeded or failed: use dr_syscall_set_result_ex() instead.