Attribute Macro panda_macros::before_block_exec_invalidate_opt[][src]

#[before_block_exec_invalidate_opt]
Expand description

(Callback) Called before execution of every basic block, with the option to invalidate the TB.

Callback ID: PANDA_CB_BEFORE_BLOCK_EXEC_INVALIDATE_OPT

   before_block_exec_invalidate_opt:

   Arguments:
    CPUState *env:        the current CPU state
    TranslationBlock *tb: the TB we are about to execute

   Helper call location: cpu-exec.c (indirectly)

   Return value:
    true if we should invalidate the current translation block
    and retranslate, false otherwise.

Callback arguments: (&mut CPUState, &mut TranslationBlock, )

Example

use panda::prelude::*;

#[panda::before_block_exec_invalidate_opt]
fn callback(_: &mut CPUState, _: &mut TranslationBlock, ) {
    // do stuff
}