diff --git a/bindings/go/unicorn/unicorn_const.go b/bindings/go/unicorn/unicorn_const.go index bd64b6dd..f2c028b1 100644 --- a/bindings/go/unicorn/unicorn_const.go +++ b/bindings/go/unicorn/unicorn_const.go @@ -53,7 +53,7 @@ const ( MEM_READ = 16 MEM_WRITE = 17 MEM_READ_WRITE = 18 - MEM_EXEC = 19 + MEM_FETCH = 19 MEM_WRITE_PROT = 20 MEM_READ_PROT = 21 MEM_EXEC_PROT = 22 diff --git a/bindings/python/unicorn/unicorn_const.py b/bindings/python/unicorn/unicorn_const.py index b63b4a27..68589235 100644 --- a/bindings/python/unicorn/unicorn_const.py +++ b/bindings/python/unicorn/unicorn_const.py @@ -51,7 +51,7 @@ UC_ERR_INVAL = 16 UC_MEM_READ = 16 UC_MEM_WRITE = 17 UC_MEM_READ_WRITE = 18 -UC_MEM_EXEC = 19 +UC_MEM_FETCH = 19 UC_MEM_WRITE_PROT = 20 UC_MEM_READ_PROT = 21 UC_MEM_EXEC_PROT = 22 diff --git a/include/unicorn/unicorn.h b/include/unicorn/unicorn.h index 5ac2bb49..9c1e37e0 100644 --- a/include/unicorn/unicorn.h +++ b/include/unicorn/unicorn.h @@ -153,7 +153,7 @@ 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_EXEC, // 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 diff --git a/qemu/softmmu_template.h b/qemu/softmmu_template.h index 07af297d..7e366bf3 100644 --- a/qemu/softmmu_template.h +++ b/qemu/softmmu_template.h @@ -185,7 +185,7 @@ WORD_TYPE helper_le_ld_name(CPUArchState *env, target_ulong addr, int mmu_idx, // Unicorn: callback on fetch from unmapped memory if (mr == NULL) { // memory is not mapped if (uc->hook_mem_idx != 0 && ((uc_cb_eventmem_t)uc->hook_callbacks[uc->hook_mem_idx].callback)( - uc, UC_MEM_EXEC, addr, DATA_SIZE, 0, + uc, UC_MEM_FETCH, addr, DATA_SIZE, 0, uc->hook_callbacks[uc->hook_mem_idx].user_data)) { env->invalid_error = UC_ERR_OK; mr = memory_mapping(uc, addr); // FIXME: what if mr is still NULL at this time? @@ -359,7 +359,7 @@ WORD_TYPE helper_be_ld_name(CPUArchState *env, target_ulong addr, int mmu_idx, // Unicorn: callback on fetch from unmapped memory if (mr == NULL) { // memory is not mapped if (uc->hook_mem_idx != 0 && ((uc_cb_eventmem_t)uc->hook_callbacks[uc->hook_mem_idx].callback)( - uc, UC_MEM_EXEC, addr, DATA_SIZE, 0, + uc, UC_MEM_FETCH, addr, DATA_SIZE, 0, uc->hook_callbacks[uc->hook_mem_idx].user_data)) { env->invalid_error = UC_ERR_OK; mr = memory_mapping(uc, addr); // FIXME: what if mr is still NULL at this time?