pub type cs_skipdata_cb_t = Option<unsafe extern "C" fn(code: *const u8, code_size: usize, offset: usize, user_data: *mut c_void) -> usize>;
Expand description

User-defined callback function for SKIPDATA option. See tests/test_skipdata.c for sample code demonstrating this API.

@code: the input buffer containing code to be disassembled. This is the same buffer passed to cs_disasm(). @code_size: size (in bytes) of the above @code buffer. @offset: the position of the currently-examining byte in the input buffer @code mentioned above. @user_data: user-data passed to cs_option() via @user_data field in cs_opt_skipdata struct below.

@return: return number of bytes to skip, or 0 to immediately stop disassembling.

Aliased Type§

enum cs_skipdata_cb_t {
    None,
    Some(unsafe extern "C" fn(_: *const u8, _: usize, _: usize, _: *mut c_void) -> usize),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(_: *const u8, _: usize, _: usize, _: *mut c_void) -> usize)

Some value of type T.