MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / copy_expr

Method copy_expr

python/highlevelil.py:2911–2927  ·  view source on GitHub ↗

``copy_expr`` adds an expression to the function which is equivalent to the given expression :param HighLevelILInstruction original: the original IL Instruction you want to copy :return: The index of the newly copied expression

(self, original: HighLevelILInstruction)

Source from the content-addressed store, hash-verified

2909 return HighLevelILInstruction.create(self, index, as_ast)
2910
2911 def copy_expr(self, original: HighLevelILInstruction) -> ExpressionIndex:
2912 """
2913 ``copy_expr`` adds an expression to the function which is equivalent to the given expression
2914
2915 :param HighLevelILInstruction original: the original IL Instruction you want to copy
2916 :return: The index of the newly copied expression
2917 """
2918 return self.expr(
2919 original.operation,
2920 original.raw_operands[0],
2921 original.raw_operands[1],
2922 original.raw_operands[2],
2923 original.raw_operands[3],
2924 original.raw_operands[4],
2925 original.size,
2926 original.source_location
2927 )
2928
2929 def replace_expr(self, original: InstructionOrExpression, new: InstructionOrExpression) -> None:
2930 """

Callers

nothing calls this directly

Calls 1

exprMethod · 0.95

Tested by

no test coverage detected