add combination hook type UC_HOOK_MEM_VALID to intercept all valid memory access

This commit is contained in:
Nguyen Anh Quynh
2016-01-31 13:12:34 +08:00
parent 1fb5416f4a
commit a2ef52172c
5 changed files with 6 additions and 0 deletions

View File

@ -218,6 +218,8 @@ typedef enum uc_hook_type {
#define UC_HOOK_MEM_FETCH_INVALID (UC_HOOK_MEM_FETCH_PROT + UC_HOOK_MEM_FETCH_UNMAPPED)
// hook type for all events of illegal memory access
#define UC_HOOK_MEM_INVALID (UC_HOOK_MEM_UNMAPPED + UC_HOOK_MEM_PROT)
// hook type for all events of valid memory access
#define UC_HOOK_MEM_VALID (UC_HOOK_MEM_READ + UC_HOOK_MEM_WRITE + UC_HOOK_MEM_FETCH)
/*
Callback function for hooking memory (UC_MEM_READ, UC_MEM_WRITE & UC_MEM_FETCH)