Skip to content

Update bindings for Capstone 4.0.x #1315

@aquynh

Description

@aquynh

So far, we have around 20 bindings for Capstone 3.x, but after updating to v4.0 (see https://github.com/aquynh/capstone/releases/tag/4.0), except Python binding, most become broken due to some changes in cs_insn structure.

Besides that, v4 added few architectures and some more APIs, that most bindings are missing now.

Finally, v4 added instructions & stuff for most architectures, but that would be handled if you are using https://github.com/aquynh/capstone/blob/master/bindings/const_generator.py.

To be sure, you can diff include/capstone/*.h between v3.0.5 & v4.0, and see the details.

Below is summary of what is broken, and new features that bindings should update to support.

Broken


[ x86 ]

  • cs_x86 added new fields: xop_cc & encoding, eflags/fpu_flags
  • cs_x86.disp type changed from int32_t to int64_t

[ mips ]

  • add mode CS_MODE_MIPS2

[ PowerPC ]

  • change cs_ppc_op.imm type from int32_t to int64_t.

[ Sparc ]

  • change cs_sparc_op.imm type from int32_t to int64_t.

New features


  • new APIs: cs_regs_access(). see http://www.capstone-engine.org/op_access.html
  • new options for cs_option(): CS_OPT_MNEMONIC & CS_OPT_UNSIGNED & CS_OPT_SYNTAX_MASM.
  • add 4 new architectures: EVM, M68K, M680X & TMS320C64x.
  • add new group types: CS_GRP_PRIVILEGE & CS_GRP_BRANCH_RELATIVE.
  • add new error types: CS_ERR_X86_MASM.
  • new instructions for most architectures.

Good bindings for Capstone 4.0.x


Here is the list of bindings that fully support Capstone 4.0.x.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions