PyObject* vm_add_memory_breakpoint(VmMngr* self, PyObject* args) { PyObject *ad; PyObject *size; PyObject *access; uint64_t b_ad; uint64_t b_size; uint64_t b_access; if (!PyArg_ParseTuple(args, "OOO", &ad, &size, &access)) RAISE(PyExc_TypeError,"Cannot parse arguments"); PyGetInt_uint64_t(ad, b_ad); PyGetInt_uint64_t(size, b_size); PyGetInt_uint64_t(access, b_access); add_memory_breakpoint(&self->vm_mngr, b_ad, b_size, (unsigned int)b_access); /* Raise exception in the following pattern: - set_mem(XXX) - add_memory_breakpoint(XXX) -> Here, there is a pending breakpoint not raise */ check_memory_breakpoint(&self->vm_mngr); Py_INCREF(Py_None); return Py_None; }
PyObject* vm_add_memory_breakpoint(VmMngr* self, PyObject* args) { PyObject *ad; PyObject *size; PyObject *access; uint64_t b_ad; uint64_t b_size; uint64_t b_access; if (!PyArg_ParseTuple(args, "OOO", &ad, &size, &access)) return NULL; PyGetInt(ad, b_ad); PyGetInt(size, b_size); PyGetInt(access, b_access); add_memory_breakpoint(&self->vm_mngr, b_ad, b_size, b_access); Py_INCREF(Py_None); return Py_None; }