mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-22 17:00:57 +00:00
python: udpate binding after the last change on uc_mem_map() API
This commit is contained in:
parent
986096d443
commit
fcd0d02bae
|
@ -73,7 +73,7 @@ _setup_prototype(_uc, "uc_mem_write", ctypes.c_int, ctypes.c_size_t, ctypes.c_ui
|
||||||
_setup_prototype(_uc, "uc_emu_start", ctypes.c_int, ctypes.c_size_t, ctypes.c_uint64, ctypes.c_uint64, ctypes.c_uint64, ctypes.c_size_t)
|
_setup_prototype(_uc, "uc_emu_start", ctypes.c_int, ctypes.c_size_t, ctypes.c_uint64, ctypes.c_uint64, ctypes.c_uint64, ctypes.c_size_t)
|
||||||
_setup_prototype(_uc, "uc_emu_stop", ctypes.c_int, ctypes.c_size_t)
|
_setup_prototype(_uc, "uc_emu_stop", ctypes.c_int, ctypes.c_size_t)
|
||||||
_setup_prototype(_uc, "uc_hook_del", ctypes.c_int, ctypes.c_size_t, ctypes.POINTER(ctypes.c_size_t))
|
_setup_prototype(_uc, "uc_hook_del", ctypes.c_int, ctypes.c_size_t, ctypes.POINTER(ctypes.c_size_t))
|
||||||
_setup_prototype(_uc, "uc_mem_map", ctypes.c_int, ctypes.c_size_t, ctypes.c_uint64, ctypes.c_size_t)
|
_setup_prototype(_uc, "uc_mem_map", ctypes.c_int, ctypes.c_size_t, ctypes.c_uint64, ctypes.c_size_t, ctypes.c_uint32)
|
||||||
|
|
||||||
# uc_hook_add is special due to variable number of arguments
|
# uc_hook_add is special due to variable number of arguments
|
||||||
_uc.uc_hook_add = getattr(_uc, "uc_hook_add")
|
_uc.uc_hook_add = getattr(_uc, "uc_hook_add")
|
||||||
|
@ -201,8 +201,8 @@ class Uc(object):
|
||||||
|
|
||||||
|
|
||||||
# map a range of memory
|
# map a range of memory
|
||||||
def mem_map(self, address, size):
|
def mem_map(self, address, size, perms=UC_PROT_ALL):
|
||||||
status = _uc.uc_mem_map(self._uch, address, size)
|
status = _uc.uc_mem_map(self._uch, address, size, perms)
|
||||||
if status != UC_ERR_OK:
|
if status != UC_ERR_OK:
|
||||||
raise UcError(status)
|
raise UcError(status)
|
||||||
|
|
||||||
|
|
|
@ -59,5 +59,8 @@ UC_HOOK_MEM_INVALID = 36
|
||||||
UC_HOOK_MEM_READ = 37
|
UC_HOOK_MEM_READ = 37
|
||||||
UC_HOOK_MEM_WRITE = 38
|
UC_HOOK_MEM_WRITE = 38
|
||||||
UC_HOOK_MEM_READ_WRITE = 39
|
UC_HOOK_MEM_READ_WRITE = 39
|
||||||
|
|
||||||
|
UC_PROT_NONE = 0
|
||||||
UC_PROT_READ = 1
|
UC_PROT_READ = 1
|
||||||
UC_PROT_WRITE = 2
|
UC_PROT_WRITE = 2
|
||||||
|
UC_PROT_ALL = 3
|
||||||
|
|
Loading…
Reference in a new issue