Attribute Macro panda_macros::after_block_translate
source · #[after_block_translate]
Expand description
(Callback) Called after execution of every basic block. If exitCode > TB_EXIT_IDX1, then the block exited early.
Callback ID: PANDA_CB_AFTER_BLOCK_EXEC
after_block_exec:
Arguments:
CPUState *env: the current CPU state
TranslationBlock *tb: the TB we just executed
uint8_t exitCode: why the block execution exited
Helper call location: cpu-exec.c
Return value:
none
Callback arguments: (&mut CPUState
, &mut TranslationBlock
, )
Example
use panda::prelude::*;
#[panda::after_block_translate]
fn callback(_: &mut CPUState, _: &mut TranslationBlock, ) {
// do stuff
}