capstone-engine / capstone

Capstone disassembly/disassembler framework for ARM, ARM64 (ARMv8), Alpha, BPF, Ethereum VM, HPPA, M68K, M680X, Mips, MOS65XX, PPC, RISC-V(rv32G/rv64G), SH, Sparc, SystemZ, TMS320C64X, TriCore, Webassembly, XCore and X86.

Home Page:http://www.capstone-engine.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Got abnormal behavior when set CS_OPT_DETAIL_REAL without CS_OPT_ON

yakamoz423 opened this issue · comments

Work environment

Questions Answers
OS/arch/bits Windows x86
Architecture armv8
Source of Capstone git clone & cmake mingw
Version/git commit next, 0d12bca

Expected behavior

According to cs_v6_release_guide, I just set cs_option(handle, CS_OPT_DETAIL, CS_OPT_DETAIL_REAL);, and I found the details is part invalid.

Changing code to cs_option(handle, CS_OPT_DETAIL, (CS_OPT_ON | CS_OPT_DETAIL_REAL));, it works.

I think it's better to make CS_OPT_DETAIL_REAL implicitly turn on the detials? or maybe the doc need to update, and don't generate groups and condition info and condition when detail turned off.

Actual behavior

console print ERROR: Too many groups defined in instruction mapping.
and groups info pile up while no other details.
This image is not captured from cstool.

Steps to reproduce the behavior

Command:

cstool -r armbe e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201e3c00201 0x233