Set an instruction operand type
set_op_typeSet an IDA instruction operand's type to struct offset, pointer, stack variable, or numeric format, fixing awkward decompiler expressions.
Instructions
Set the type of an instruction operand. GUI 'Y' / 'O' / '#' equivalent.
Tags an operand at a specific instruction with a desired interpretation. Useful when the decompiler picks an awkward expression form (e.g., the "earlier-named-symbol + offset" form for contiguous globals).
kind values:
"stroff": struct-offset reference. Requiresstruct, optionaldelta."offset": absolute offset / pointer. Optionaltarget_addr."hex" | "dec" | "char" | "binary" | "octal": numeric format."stkvar": stack-variable reference (function-local).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Operand-typing ops. Equivalent to GUI 'Y' (struct offset) or 'O' (offset) operations. | |
| instance_id | No | Optional database instance id. If omitted, use the current target. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |