pub unsafe extern "C" fn drwrap_invoke_insert_cleanup_only(
drcontext: *mut c_void,
tag: *mut c_void,
bb: *mut instrlist_t,
inst: *mut instr_t,
where_: *mut instr_t,
for_trace: bool_,
translating: bool_,
user_data: *mut c_void,
) -> dr_emit_flags_tExpand description
When #drwrap_global_flags_t #DRWRAP_INVERT_CONTROL is set and the user is using multiple types of instrumentation such as with drbbdup, the user must call this function for each instrumentation case where function wrapping should not be enabled. (If the instrumentation type changes to don’t-wrap and then changes back to wrap all in the middle of a wrapped function, the full post-wrap callback (plus cleanup) would then naturally be called.) This will insert required cleanup for instrumentation cases changing in the middle of a wrapped function. It will not invoke any wrapped function callbacks. It is up to the user to control the ordering, since the priority #DRMGR_PRIORITY_INSERT_DRWRAP will not apply. The separate “where” handles cases such as with drbbdup’s final app instruction (which cannot be duplicated into each case) or with emulation where the instruction “inst” to monitor is distinct from the location “where” to insert instrumentation. The \p user_data parameter is ignored.