1 ChangeLog 2.1
Nguyen Anh Quynh edited this page 2014-03-05 07:42:04 -08:00

(Look here for the detailed changelog of v2.0)

This page details all the changes in the next branch, against the master branch. This next branch will become next version (2.1), and will be merged into the master branch when next version is released.

The latest next code can be directly retrieved from https://github.com/aquynh/capstone/archive/next.zip, or via git - see instructions at the bottom of this page.

NOTE: changes are listed in order: newer changes are at the top, older changes are at the bottom.

  • Python has a new API debug() to return general information about binding & core: Cython support, diet status, archs compiled in, core & bindin vesion

  • Cython: fixed a bug crashing code accessing @regs_read/@regswrite/@groups.

  • API change: cs_close() changes from

cs_err cs_close(csh handle);

to

cs_err cs_close(csh *handle);

Internally, this API invalidates handle after cs_close(). This is to make sure it is impossible to (wrongly) continue to use other APIs after that.

NOTE: this should only affect C program using the core API, but should not have any impact on binding users (which should hide this change from users)

  • Python binding has new API: version_bind(), which returns binding's version, which might differ from core's API version. Thanks to this, we can verify if the core & binding are compatible with 1 line of Python code like below:
  $ python -c "from capstone import *; print(version_bind() == cs_version())”
  True
  • Add a new diet compile option, which eliminate some 'redundant' data fields in cs_insn struct, such as @mnemonic, @op_str, @regs_read, @regs_write & @groups. This reduces the binary size by up to 50% in some individual arch, make Capstone more suitable for embedding or use in kernel environment.

    To compile Capstone in diet mode, modify config.mk accordingly before compiling.

    At the same time, the API cs_support() is extended (but still have backward compatibility) to check if the library was compiled with diet option. A query value CS_SUPPORT_DIET was added for this purpose.

    This change also added new error code CS_ERR_DIET, which report the issue when irrelevant data/APIs are used in diet mode.

  • Significantly trim down the framework size, without sacrificing on performance. X86-only binary size reduces nearly 3 times, from 2 MB to 700 KB now. This also reduces the memory consumed by the same amount.

    The whole library, including all 5 archs, is 1.9 MB now (it was 3.2 MB in 2.0)

  • Fixed some memory leaking in Java & Cython bindings.

  • Python binding now has disasm_lite() method, which only returns tuples of (address, size, mnemonic, op_str), rather than list of CsInsn objects. This improves performance by around 30% in some benchmarks.

    See sample code bindings/python/test_lite.py to understand how this new API works.

  • API version bumped from 2.0 to 2.1.

  • Updated ARM & ARM64 core to fix some minor issues.

  • PowerPC: added new instructions FMR & MSYNC. Also added new groups BOOKE & NOTBOOKE.

  • Mips: added a new instruction DLSA & a new group MIPS_GRP_NOTNACL

  • Python: verify & enforce the rule: binding have the same API version with the core. Refuse to run otherwise.

  • Add new error code CS_ERR_VERSION to report when binding & core have different API version.

  • X86: update regs_read/write with ECX/RCX registers on REP instructions.

  • X86: now we can handle AVX512 instructions.

  • make.sh now can be used to uninstall the core engine: sudo ./make.sh uninstall

  • X86: fixed some mem leaking issue, and handles prefixed instructions better.

  • X86: added support for instructions missing in 2.0: PSETPM, SALC, INT1, GETSEC.


Checkout -next branch

To checkout next branch, simply do this:

    $ git pull
    $ git checkout next

Then make sure to compile and install new code:

    $ ./make.sh
    $ sudo ./make.sh install

The next branch is frequently updated, so make sure to always get the latest code with:

    $ git pull origin next

Any time you want to get back to master branch, do:

    $ git checkout master