Skip to main content

decode

Function decode 

Source
pub fn decode<F>(
    bytes: &[u8],
    rip: u64,
    register: F,
) -> Result<Decoded, DecodeError>
where F: Fn(u8) -> u64,
Expand description

Decodes one instruction.

bytes starts at the instruction; rip is its linear address (used for RIP-relative addressing and the returned next RIP); register returns the current value of a general-purpose register (0 = RAX … 15 = R15).