ubpf_debug_fn

Type Alias ubpf_debug_fn 

Source
pub type ubpf_debug_fn = Option<unsafe extern "C" fn(context: *mut c_void, program_counter: c_int, registers: *const u64, stack_start: *const u8, stack_length: usize, register_mask: u64, stack_mask_start: *const u8)>;
Expand description

@brief A function to invoke before each instruction.

@param[in, out] context Context passed in to ubpf_register_debug_fn. @param[in] program_counter Current instruction pointer. @param[in] registers Array of 11 registers representing the VM state. @param[in] stack_start Pointer to the beginning of the stack. @param[in] stack_length Size of the stack in bytes. @param[in] register_mask Bitmask of registers that have been modified since the start of the program. Each set bit represents 1 modified register. LSB corresponds to register 0 and so on. @param[in] stack_mask_start Bitmask of the stack that has been modified since the start of the program. Each set bit represents 1 byte of the stack that has been modified. LSB corresponds to the first byte relative to stack_start and the MSB corresponds to the last byte. Note that the stack grows downwards, so the byte corresponding to the MSB is the first byte of the stack from the POV of the program and LSB is the last byte.

Aliased Type§

pub enum ubpf_debug_fn {
    None,
    Some(unsafe extern "C" fn(*mut c_void, i32, *const u64, *const u8, usize, u64, *const u8)),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*mut c_void, i32, *const u64, *const u8, usize, u64, *const u8))

Some value of type T.