pub unsafe extern "C" fn dr_replace_fragment(
drcontext: *mut c_void,
tag: *mut c_void,
ilist: *mut instrlist_t,
) -> bool_Expand description
Replaces the fragment with tag \p tag with the instructions in \p ilist. This routine is only valid with the -thread_private option; it replaces the fragment for the current thread only. After replacement, the existing fragment is allowed to complete if currently executing. For example, a clean call replacing the currently executing fragment will safely return to the existing code. Subsequent executions will use the new instructions.
\note The routine takes control of \p ilist and all responsibility for deleting it. The client should not keep, use, or reference, the instrlist or any of the instrs it contains after passing.
\note This routine supports replacement for the current thread only. \p drcontext must be from the current thread and must be the drcontext used to create the instruction list. This routine may not be called from the thread exit event.
\return false if the fragment does not exist and true otherwise.