2.1
Release 2.1 brings a lot of important changes: see here on how to modify 2.0-based code to work with 2.1 API.
API changes:
-
API version has been bumped to 2.1.
-
Change prototype of cs_close() to be able to invalidate closed handle. See http://capstone-engine.org/version_2.1_API.html for more information.
-
Extend cs_support() to handle more query types, not only about supported architectures. This change is backward compatible, however, so existent code do not need to be modified to support this.
-
New query type CS_SUPPORT_DIET for cs_support() to ask about diet status of the engine.
-
New error code CS_ERR_DIET to report errors about newly added diet mode.
-
New error code CS_ERR_VERSION to report issue of incompatible versions between bindings & core engine.
Core changes
-
On memory usage, Capstone uses about 40% less memory, while still faster than version 2.0.
-
All architectures are much smaller: binaries size reduce at least 30%. Especially, X86-only binary reduces from 1.9MB to just 720KB.
-
Support diet mode, in which engine size is further reduced (by around 40%) for embedding purpose. The price to pay is that we have to sacrifice some non-critical data fields. See http://capstone-engine.org/diet.html for more details.
Architectures
-
Update all 5 architectures to fix bugs.
-
PowerPC:
- New instructions: FMR & MSYNC.
-
Mips:
- New instruction: DLSA
-
X86:
-
Properly handle AVX-512 instructions.
-
New instructions: PSETPM, SALC, INT1, GETSEC.
-
Fix some memory leaking issues in case of prefixed instructions such as LOCK, REP, REPNE.
-
Python binding
-
Verify the core version at initialization time. Refuse to run if its version is different from the core’s version.
-
New API disasm_lite() added to Cs class. This light API only returns tuples of (address, size, mnemonic, op_str), rather than list of CsInsn objects. This improves performance by around 30% in some benchmarks.
-
New API version_bind() returns binding’s version, which might differ from the core’s API version if binding is out-of-date.
-
New API debug() returns information on Cython support, diet status, archs compiled in & versions of core & binding.
-
Fixed some memory leaking bugs for Cython binding.
-
Fix a bug crashing Cython code when accessing @regs_read/regs_write/groups.
-
Support diet mode.
Java binding
-
Fix some memory leaking bugs.
-
New API version() returns combined API version.
-
Support diet mode.
-
Better support for detail option.
Miscellaneous
- make.sh now can uninstall the core engine. This is done with: