summaryrefslogtreecommitdiff
path: root/python/lowlevelil.py
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2025-02-24 17:08:50 -0500
committerGlenn Smith <glenn@vector35.com>2025-03-05 16:39:59 -0500
commit9011177909529852181726329626234110099652 (patch)
treefdbd8ef3591182c45ccbaf00974bf7b7ef86c6ad /python/lowlevelil.py
parent4501746424590380578222766731587320816671 (diff)
Python: Make copy_expr copy with location
Co-Authored-By: ltlly <a1253213025@163.com>
Diffstat (limited to 'python/lowlevelil.py')
-rw-r--r--python/lowlevelil.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py
index 3f2616b5..04e9ab5f 100644
--- a/python/lowlevelil.py
+++ b/python/lowlevelil.py
@@ -573,6 +573,10 @@ class LowLevelILInstruction(BaseILInstruction):
return self.instr.source_operand
@property
+ def source_location(self) -> ILSourceLocation:
+ return ILSourceLocation.from_instruction(self)
+
+ @property
def tokens(self) -> TokenList:
"""LLIL tokens (read-only)"""
# special case for those instructions that don't have tokens
@@ -3859,7 +3863,8 @@ class LowLevelILFunction:
original.raw_operands[2],
original.raw_operands[3],
original.size,
- original.raw_flags
+ original.raw_flags,
+ original.source_location
)
def replace_expr(self, original: InstructionOrExpression, new: InstructionOrExpression) -> None: