-
-
Save moyix/e0e8f398fff6bd5df80d9aad630df754 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define __STDC_FORMAT_MACROS | |
#include "panda/plugin.h" | |
// These need to be extern "C" so that the ABI is compatible with | |
// QEMU/PANDA, which is written in C | |
extern "C" { | |
bool init_plugin(void *); | |
void uninit_plugin(void *); | |
} | |
int after_block_exec(CPUState *env, TranslationBlock *tb) { | |
assert (tb->size != 0 && tb->icount != 0); | |
return 0; | |
} | |
bool init_plugin(void *self) { | |
panda_cb pcb; | |
pcb.after_block_exec = after_block_exec; | |
panda_register_callback(self, PANDA_CB_AFTER_BLOCK_EXEC, pcb); | |
return true; | |
} | |
void uninit_plugin(void *self) { } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment