From ec5ce624966b0675ce7b79fb9408609d30bf87e7 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Wed, 8 May 2019 22:17:02 -0400 Subject: add documentation for replace_expr --- python/lowlevelil.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'python/lowlevelil.py') diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 9435fd5c..a32eb4a2 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -940,6 +940,14 @@ class LowLevelILFunction(object): return LowLevelILExpr(core.BNLowLevelILAddExpr(self.handle, operation, size, flags, a, b, c, d)) def replace_expr(self, original, new): + """ + ``replace_expr`` allows modification of LowLevelILExpressions but ONLY during lifting. + + .. warning:: This function should ONLY be called as a part of a lifter. It will otherwise not do anything useful as there's no way to trigger re-analysis of IL levels at this time. + :param LowLevelILExpr original: the LowLevelILExpr to replace (may also be an expression index) + :param LowLevelILExpr new: the LowLevelILExpr to add to the current LowLevelILFunction (may also be an expression index) + :rtype: None + """ if isinstance(original, LowLevelILInstruction): original = original.expr_index elif isinstance(original, LowLevelILExpr): -- cgit v1.3.1