pub unsafe extern "C" fn dr_prepare_for_call(
drcontext: *mut c_void,
ilist: *mut instrlist_t,
instr: *mut instr_t,
) -> uintExpand description
Inserts into \p ilist prior to \p where meta-instruction(s) to save state for a call. Stores the application state information on the DR stack. Returns the size of the data stored on the DR stack (in case the caller needs to align the stack pointer).
\warning On x86, this routine does NOT save the x87 floating-point or MMX state: to do that the instrumentation routine should call proc_save_fpstate() to save and then proc_restore_fpstate() to restore (or use dr_insert_clean_call()).
\note The preparation modifies the DR_REG_XSP and DR_REG_XAX registers (after saving them). Use dr_insert_clean_call() instead if an argument to the subsequent call that references DR_REG_XAX is desired.
\note The stack used to save the state is limited to 20KB by default; this can be changed with the -stack_size DR runtime parameter. This stack cannot be used to store state that persists beyond a single clean call, code cache execution, or probe callback function execution.