[][src]Function capstone_sys::cs_op_index

pub unsafe extern "C" fn cs_op_index(
    handle: csh,
    insn: *const cs_insn,
    op_type: c_uint,
    position: c_uint
) -> c_int

Retrieve the position of operand of given type in .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 .operands[] array in instruction @insn, or -1 on failure.