Instruction.previous_instruction()
Returns a list of immediate previous instructions in the control flow graph.
previous_instruction() →
APISet
[
Instruction
]
The difference between the previous_instruction() function and previous_instructions() is that this function will return a list of immediate previous instructions of the current instruction in the CFG (control-flow-graph).
The function is intra-procedural.
For example, in the function:
for the instruction:
the function will return the instruction:
Query Example
Output Example
The function returns APISet, instead of APIList, in case the result of the function is used as the return value of the query it must be casted to list()
Last updated