Type Alias Fn_MemAccID_CB

Source
pub type Fn_MemAccID_CB = Option<unsafe extern "C" fn(p_context: *const c_void, address: ocsd_vaddr_t, mem_space: ocsd_mem_space_acc_t, trcID: u8, reqBytes: u32, byteBuffer: *mut u8) -> u32>;
Expand description

Callback function definition for callback function memory accessor type.

When using callback memory accessor, the decoder will call this function to obtain the memory at the address for the current opcodes. The memory space will represent the current exception level and security context of the traced code.

Return the number of bytes read, which can be less than the amount requested if this would take the access address outside the range of addresses defined when this callback was registered with the decoder.

Return 0 bytes if start address out of covered range, or memory space is not one of those defined as supported when the callback was registered.

@param p_context : opaque context pointer set by callback client. @param address : start address of memory to be accessed @param mem_space : memory space of accessed memory (current EL & security state) @param trcID : Trace ID for source of trace - allow CB to client to associate mem req with source cpu. @param reqBytes : number of bytes required @param *byteBuffer : buffer for data.

@return uint32_t : Number of bytes actually read, or 0 for access error.

Aliased Type§

enum Fn_MemAccID_CB {
    None,
    Some(unsafe extern "C" fn(*const c_void, u64, u32, u8, u32, *mut u8) -> u32),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(unsafe extern "C" fn(*const c_void, u64, u32, u8, u32, *mut u8) -> u32)

Some value of type T.