unicorn
unicorn copied to clipboard
New and improved Python bindings
Re-implemented Unicorn Python bindings while remaining compatible with the original bindings API.
Highlights:
- OOP design for improved efficiency and extensibility
- Pythonic code featuring type annotations to facilitate its usage
- Cleaner code and documented methods
- Lower memory footprint
- Improved Uc resources deallocation
Changes:
-
UcError
now provides additional information, when applicable, to provide the users with better error context (e.g. the target address and access size for invalid memory accesses) - Intel arch now supports reading and writing ZMM registers
- ARM arch now supports reading and writing Q registers
See my PoC in #1633
@wtdcode, any thoughts or comments, considering this comment and this commit?
we have been thinking about merging this after 2.0.1 release.
can you add some sample code under bindings/python/ to demonstrate the new API?
can you add some sample code under bindings/python/ to demonstrate the new API?
The external facing API was not modified, it is only the internal implementation that was changed. Except minor additions (e.g. some archs now support more regs) nothing really changed in terms of functionality. UcError
now provides more info, so that could be one possible feature to show. Do you have anything specific on your mind..?
oh i thought you added some more Pythonic API
merged and thanks for your patient.
I'm doing a careful comparison to ensure nothing breaks.
It passes all local tests, if that counts.
Our tests for Python bindings are not complete and thus I'm looking into the history to manually port missing features.
Well, every time there was an update to the Python binding I changed my code to accommodate. Anyway, if something is missing or incompatible, let me know and I'll fix it.