Gets all the instructions that use the given SSA variable.
(self, ssa_var: Union['mediumlevelil.SSAVariable', HighLevelILVarSsa])
| 2781 | return HighLevelILInstruction.create(self, ExpressionIndex(result)) |
| 2782 | |
| 2783 | def get_ssa_var_uses(self, ssa_var: Union['mediumlevelil.SSAVariable', HighLevelILVarSsa]) -> List[HighLevelILInstruction]: |
| 2784 | """ |
| 2785 | Gets all the instructions that use the given SSA variable. |
| 2786 | """ |
| 2787 | if isinstance(ssa_var, HighLevelILVarSsa): |
| 2788 | ssa_var = ssa_var.var |
| 2789 | if not isinstance(ssa_var, mediumlevelil.SSAVariable): |
| 2790 | raise ValueError("Expected SSAVariable") |
| 2791 | count = ctypes.c_ulonglong() |
| 2792 | var_data = ssa_var.var.to_BNVariable() |
| 2793 | instrs = core.BNGetHighLevelILSSAVarUses(self.handle, var_data, ssa_var.version, count) |
| 2794 | assert instrs is not None, "core.BNGetHighLevelILSSAVarUses returned None" |
| 2795 | result = [] |
| 2796 | for i in range(0, count.value): |
| 2797 | result.append(HighLevelILInstruction.create(self, instrs[i])) |
| 2798 | core.BNFreeILInstructionList(instrs) |
| 2799 | return result |
| 2800 | |
| 2801 | def get_ssa_memory_uses(self, version: int) -> List[HighLevelILInstruction]: |
| 2802 | count = ctypes.c_ulonglong() |
no test coverage detected