cs_reg_read

Check if a disassembled instruction IMPLICITLY used a particular register. Find the register id from header file of corresponding architecture (arm.h for ARM, x86.h for X86, ...) Internally, this simply verifies if @reg_id matches any member of insn->regs_read array.

NOTE: this API is only valid when detail option is ON (which is OFF by default)

WARN: when in 'diet' mode, this API is irrelevant because the engine does not update @regs_read array.

@insn: disassembled instruction structure received from cs_disasm() or cs_disasm_iter() @reg_id: register that you want to check if this instruction used it.

@return: true if this instruction indeed implicitly used the given register, or false otherwise.

extern (C)
bool
cs_reg_read
(
csh handle
,
const(cs_insn)* insn
,
uint reg_id
)

Meta