Closed gerph closed 1 year ago
That’s a bug in Py2 binding and I will push a fix for that.
I pushed fix at 3c89d0c3ce0047f771135c71310f5d402b4f9a52.
But please note that, before 2.1.0 release, the content in restore-py2
may be changed without notice though the major APIs are guaranteed not changed.
Understood; I'm trying to update my application to handle Unicorn 2 properly - although it worked in the simple cases I was hitting upon the cached instruction problems, and adding this invalidation should help. If I find anything else that's inconsistent or I cannot work, I'll report issues, but I understand that there might be other changes in it.
Thanks for the very speedy response!
As fixed already (the patch will go to next release for sure!), I will close this issue.
Hiya,
I'm trying to work out how to use ctl_remove_cache efficiently with Unicorn 2 on Python 2.
I've installed the build from the
restore-py2
branch (this might be wrong, but it seems like where I should be looking), by runningpython setup.py bdist
and then installing the wheel that's created withpip install dist/unicorn-2.0.2-py2.py3-none-macosx_10_14_x86_64.whl
.However, when I look at the
unicorn_py2.py
file, I see that the remove_cache call is defined as:This looks like I have to call the
ctl_remove_cache
for every single address that I have modified - that can get very tedious if a large block of code has been loaded and needs to be updated.In the python 3 version in the source (
unicorn_py3/unicorn.py
), however, I see:This looks like it's a range, which is a lot better for efficiency.
I'm not sure whether the interface is actually different on Python 2, or whether they're inconsistent, or if I'm even using the right branch to try to get Python 2 support to work.
Can you help resolve what I need to do?