mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 00:45:40 +00:00
Update UC_HOOK_MEM_VALID (#837)
* Update UC_HOOK_MEM_VALID UC_HOOK_MEM_READ fires before handlers for invalid memory reads, so UC_HOOK_MEM_VALID would technically also be receiving invalid memory reads. Switching to UC_HOOK_MEM_READ_AFTER ensures that only actually valid reads are hooked * Removed macro change, added comment Removed the macro change, but added a clarifying comment. May submit a future PR with a new macro added * Update unicorn.h will -> may * Update unicorn.h
This commit is contained in:
parent
85e0a54e35
commit
14222bd5f0
|
@ -248,6 +248,8 @@ typedef enum uc_hook_type {
|
|||
// 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
|
||||
// NOTE: UC_HOOK_MEM_READ is triggered before UC_HOOK_MEM_READ_PROT and UC_HOOK_MEM_READ_UNMAPPED, so
|
||||
// this hook may technically trigger on some invalid reads.
|
||||
#define UC_HOOK_MEM_VALID (UC_HOOK_MEM_READ + UC_HOOK_MEM_WRITE + UC_HOOK_MEM_FETCH)
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue