Skip to main content

dr_mcontext_to_context

Function dr_mcontext_to_context 

Source
pub unsafe extern "C" fn dr_mcontext_to_context(
    dst: *mut CONTEXT,
    src: *mut dr_mcontext_t,
) -> bool_
Expand description

Copies the machine state in \p src into \p dst. Sets the \p ContextFlags field of \p dst to reflect the \p flags field of \p src. However, CONTEXT_CONTROL includes Ebp/Rbp, while that’s under #DR_MC_INTEGER, so we recommend always setting both #DR_MC_INTEGER and #DR_MC_CONTROL when calling this routine.

It is up to the caller to ensure that \p dst is allocated and initialized properly in order to contain multimedia processor state, if #DR_MC_MULTIMEDIA is set in the \p flags field of \p src.

The current segment register values are filled in under the assumption that this context is for the calling thread.

\note floating-point values are not filled in for \p dst. \note Windows only.

\return false if unsuccessful; if successful, does not return.