capstone-engine / capstone

Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, LoongArch, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.
http://www.capstone-engine.org
7.61k stars 1.56k forks source link

test_riscv.py failing #2405

Closed KelvinChung2000 closed 2 months ago

KelvinChung2000 commented 3 months ago

Work environment

Questions Answers
OS/arch/bits Pop os
Architecture x86
Source of Capstone pip
Version/git commit v5.0.1

Expected behavior

When running the bindings/python/tests/test_riscv.py should not be fault.

Actual behavior

Getting the following: File "/home/kelvin/capstone/./bindings/python/tests/test_riscv.py", line 45, in print_insn_detail if i.access == CS_AC_READ: AttributeError: 'RISCVOp' object has no attribute 'access'

Steps to reproduce the behavior

calling python3 ./bindings/python/tests/test_riscv.py from the root directory of Capstone git clone

Additional Logs, screenshots, source code, configuration dump, ...

image

I found this problem because when I try to use regs_access for a CsInsn, which I am also getting errors. This led me to find an example and find this. The cause of the error is not the same. Should I open another issue about that?

Rot127 commented 3 months ago

I currently rewrite testing. So this one will be fixed with https://github.com/capstone-engine/capstone/pull/2384

KelvinChung2000 commented 3 months ago

I would also like to ask about the regs_access issue. Should I open another issue for a bug report?

Rot127 commented 3 months ago

Ah yes, please do so.