Skip to main content

decode_sizeof_ex

Function decode_sizeof_ex 

Source
pub unsafe extern "C" fn decode_sizeof_ex(
    drcontext: *mut c_void,
    pc: *mut byte,
    num_prefixes: *mut c_int,
    rip_rel_pos: *mut uint,
) -> c_int
Expand description

Decodes only enough of the instruction at address \p pc to determine its size. Returns that size. If \p num_prefixes is non-NULL, returns the number of prefix bytes.

On x86, if \p rip_rel_pos is non-NULL, returns the offset into the instruction of a rip-relative addressing displacement for data or control-transfer relative addressing, or 0 if none. This is only implemented for x86, where the displacement is always 4 bytes for data but can be 1 byte for control.

May return 0 size for certain invalid instructions.