Adding INSN hook checks for x86 (#833)
* adding INSN hook checking for x86 * tabs to spaces * need to return bool not uc_err * fixed conditional after switching to bool
This commit is contained in:
@@ -78,6 +78,9 @@ typedef bool (*uc_args_int_t)(int intno);
|
||||
// some architecture redirect virtual memory to physical memory like Mips
|
||||
typedef uint64_t (*uc_mem_redirect_t)(uint64_t address);
|
||||
|
||||
// validate if Unicorn supports hooking a given instruction
|
||||
typedef bool(*uc_insn_hook_validate)(uint32_t insn_enum);
|
||||
|
||||
struct hook {
|
||||
int type; // UC_HOOK_*
|
||||
int insn; // instruction for HOOK_INSN
|
||||
@@ -169,6 +172,8 @@ struct uc_struct {
|
||||
// TODO: remove current_cpu, as it's a flag for something else ("cpu running"?)
|
||||
CPUState *cpu, *current_cpu;
|
||||
|
||||
uc_insn_hook_validate insn_hook_validate;
|
||||
|
||||
MemoryRegion *system_memory; // qemu/exec.c
|
||||
MemoryRegion io_mem_rom; // qemu/exec.c
|
||||
MemoryRegion io_mem_notdirty; // qemu/exec.c
|
||||
|
||||
Reference in New Issue
Block a user