diff --git a/bindings/python/unicorn/unicorn_py2.py b/bindings/python/unicorn/unicorn_py2.py index 60e2bad6..1358bb27 100644 --- a/bindings/python/unicorn/unicorn_py2.py +++ b/bindings/python/unicorn/unicorn_py2.py @@ -719,6 +719,11 @@ class Uc(object): arg = ctp(val) self.ctl(self.__ctl_w(ctl, 1), arg) + def __ctl_w_2_arg(self, ctl, val1, val2, ctp1, ctp2): + arg1 = ctp1(val1) + arg2 = ctp2(val2) + self.ctl(self.__ctl_w(ctl, 2), arg1, arg2) + def __ctl_rw_1_1_arg(self, ctl, val, ctp1, ctp2): arg1 = ctp1(val) arg2 = ctp2() @@ -764,8 +769,8 @@ class Uc(object): def ctl_set_cpu_model(self, val): self.__ctl_w_1_arg(uc.UC_CTL_CPU_MODEL, val, ctypes.c_int) - def ctl_remove_cache(self, addr): - self.__ctl_w_1_arg(uc.UC_CTL_TB_REMOVE_CACHE, addr, ctypes.c_uint64) + def ctl_remove_cache(self, addr, end): + self.__ctl_w_2_arg(uc.UC_CTL_TB_REMOVE_CACHE, addr, end, ctypes.c_uint64, ctypes.c_uint64) def ctl_request_cache(self, addr): return self.__ctl_rw_1_1_arg(uc.UC_CTL_TB_REQUEST_CACHE, addr, ctypes.c_uint64, uc_tb)