Skip to main content

decode_sizeof

Function decode_sizeof 

Source
pub unsafe extern "C" fn decode_sizeof(
    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 only: ignores control-transfer relative addressing; use decode_sizeof_ex() for that), or 0 if none. The \p rip_rel_pos parameter is only implemented for x86, where the displacement is always 4 bytes in size.

May return 0 size for certain invalid instructions.