Skip to content

Fix capstone 6 compatibility for ARM64 and RISC-V#1632

Open
kripticni wants to merge 1 commit into
qilingframework:devfrom
kripticni:fix/capstone-v6-compat
Open

Fix capstone 6 compatibility for ARM64 and RISC-V#1632
kripticni wants to merge 1 commit into
qilingframework:devfrom
kripticni:fix/capstone-v6-compat

Conversation

@kripticni

Copy link
Copy Markdown

Capstone 6 renamed several architecture constants in its Python bindings:

  • CS_ARCH_ARM64 -> CS_ARCH_AARCH64 (old name removed)
  • CS_MODE_RISCVC -> CS_MODE_RISCV_C (old name still aliased in v6, but future
    versions may drop it)

This PR:

  • Adds try/except fallback in arm64.py for the ARM64 / AARCH64 rename
  • Adds forward-compatible try/except in riscv.py and riscv64.py for RISCVC /
    RISCV_C
  • Relaxes the capstone dependency from ^5 to >=5,<7 to allow capstone 6.x

Target branch: dev

Checklist:

  • This PR only contains minor fixes.
  • The new code conforms to Qiling Framework naming convention.
  • The imports are arranged properly.
  • No extra tests are needed for this PR.
  • This PR doesn't need to update Changelog.
  • The target branch is dev branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant