summaryrefslogtreecommitdiff
path: root/python/lowlevelil.py
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2019-05-08 22:17:02 -0400
committerJordan Wiens <jordan@psifertex.com>2019-05-08 22:17:02 -0400
commitec5ce624966b0675ce7b79fb9408609d30bf87e7 (patch)
tree47bc03052244fe2ad24e669eaead411aba845803 /python/lowlevelil.py
parent2d731fed5b1942143fd3991fd3b60667707a47a5 (diff)
add documentation for replace_expr
Diffstat (limited to 'python/lowlevelil.py')
-rw-r--r--python/lowlevelil.py8
1 files changed, 8 insertions, 0 deletions
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):