Skip to main content
The OperandOrigin object provides information about where an operand (function argument or return value) originates in the binary, including its source and definition addresses and positions.

Fields

FieldDescriptionType
source_addressAddress where the operand’s value was sourcedAddressValue
source_positionPosition of the source IR instructionnumber
definition_addressAddress where the operand was definedAddressValue
definition_positionPosition of the IR instruction where the operand was definednumber
indexIndex of the operand in the contextnumber

Reference

source_address

The address where the operand’s value was sourced.

source_position

The position of the source IR instruction.

definition_address

The address where the operand was defined.

definition_position

The position of the IR instruction where the operand was defined.

index

The index of the operand in the context.

Example

-- Access the operand (OperandInfo) of the second argument
local src = context.inputs[2]

-- Access the origin information for the operand
local origin = src.origin

print("Source address:", origin.source_address)
print("Source position:", origin.source_position)
print("Definition address:", origin.definition_address)
print("Definition position:", origin.definition_position)
print("Operand index in context:", origin.index)