cs_op_index

Retrieve the position of operand of given type in <arch>.operands[] array. Later, the operand can be accessed using the returned position. Find the operand type in header file of corresponding architecture (arm.h for ARM, x86.h for X86, ...)

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

@handle: handle returned by cs_open() @insn: disassembled instruction structure received from cs_disasm() or cs_disasm_iter() @op_type: Operand type to be found. @position: position of the operand to be found. This must be in the range [1, cs_op_count(handle, insn, op_type)]

@return: index of operand of given type @op_type in <arch>.operands[] array in instruction @insn, or -1 on failure.

extern (C)
int
cs_op_index
(
csh handle
,
const(cs_insn)* insn
,
uint op_type
,
)

Meta