diff --git a/bindings/python/unicorn/unicorn_const.py b/bindings/python/unicorn/unicorn_const.py index 7999afc1..ec0896a6 100644 --- a/bindings/python/unicorn/unicorn_const.py +++ b/bindings/python/unicorn/unicorn_const.py @@ -53,19 +53,20 @@ UC_ERR_WRITE_UNALIGNED = 18 UC_ERR_FETCH_UNALIGNED = 19 UC_MEM_READ = 16 UC_MEM_WRITE = 17 -UC_MEM_READ_WRITE = 18 -UC_MEM_FETCH = 19 -UC_MEM_WRITE_PROT = 20 -UC_MEM_READ_PROT = 21 -UC_MEM_EXEC_PROT = 22 +UC_MEM_FETCH = 18 +UC_MEM_WRITE_PROT = 19 +UC_MEM_READ_PROT = 20 +UC_MEM_FETCH_PROT = 21 UC_HOOK_INTR = 32 UC_HOOK_INSN = 33 UC_HOOK_CODE = 34 UC_HOOK_BLOCK = 35 -UC_HOOK_MEM_INVALID = 36 -UC_HOOK_MEM_READ = 37 -UC_HOOK_MEM_WRITE = 38 -UC_HOOK_MEM_READ_WRITE = 39 +UC_HOOK_MEM_INVALID_READ = 36 +UC_HOOK_MEM_INVALID_WRITE = 37 +UC_HOOK_MEM_INVALID_FETCH = 38 +UC_HOOK_MEM_READ = 39 +UC_HOOK_MEM_WRITE = 40 +UC_HOOK_MEM_FETCH = 41 UC_PROT_NONE = 0 UC_PROT_READ = 1 diff --git a/include/unicorn/unicorn.h b/include/unicorn/unicorn.h index 08e01028..6e5a49bb 100644 --- a/include/unicorn/unicorn.h +++ b/include/unicorn/unicorn.h @@ -155,23 +155,24 @@ typedef void (*uc_cb_insn_out_t)(uc_engine *uc, uint32_t port, int size, uint32_ typedef enum uc_mem_type { UC_MEM_READ = 16, // Unmapped memory is read from UC_MEM_WRITE, // Unmapped memory is written to - UC_MEM_READ_WRITE, // Unmapped memory is accessed (either READ or WRITE) - UC_MEM_FETCH, // Unmapped memory is fetched + UC_MEM_FETCH, // Unmapped memory is fetched UC_MEM_WRITE_PROT, // Write to write protected, but mapped, memory UC_MEM_READ_PROT, // Read from read protected, but mapped, memory - UC_MEM_EXEC_PROT, // Fetch from non-executable, but mapped, memory + UC_MEM_FETCH_PROT, // Fetch from non-executable, but mapped, memory } uc_mem_type; // All type of hooks for uc_hook_add() API. typedef enum uc_hook_type { - UC_HOOK_INTR = 32, // Hook all interrupt events - UC_HOOK_INSN, // Hook a particular instruction - UC_HOOK_CODE, // Hook a range of code - UC_HOOK_BLOCK, // Hook basic blocks - UC_HOOK_MEM_INVALID, // Hook for all invalid memory access events - UC_HOOK_MEM_READ, // Hook all memory read events. - UC_HOOK_MEM_WRITE, // Hook all memory write events. - UC_HOOK_MEM_READ_WRITE, // Hook all memory accesses (either READ or WRITE). + UC_HOOK_INTR = 32, // Hook all interrupt events + UC_HOOK_INSN, // Hook a particular instruction + UC_HOOK_CODE, // Hook a range of code + UC_HOOK_BLOCK, // Hook basic blocks + UC_HOOK_MEM_INVALID_READ, // Hook for invalid memory read events + UC_HOOK_MEM_INVALID_WRITE, // Hook for invalid memory write events + UC_HOOK_MEM_INVALID_FETCH, // Hook for invalid memory fetch for execution events + UC_HOOK_MEM_READ, // Hook all memory read events. + UC_HOOK_MEM_WRITE, // Hook all memory write events. + UC_HOOK_MEM_FETCH, // Hook all memory fetch for execution events } uc_hook_type; // Callback function for hooking memory (UC_HOOK_MEM_*)