From 9011177909529852181726329626234110099652 Mon Sep 17 00:00:00 2001 From: Glenn Smith Date: Mon, 24 Feb 2025 17:08:50 -0500 Subject: Python: Make copy_expr copy with location Co-Authored-By: ltlly --- python/lowlevelil.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'python/lowlevelil.py') diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 3f2616b5..04e9ab5f 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -572,6 +572,10 @@ class LowLevelILInstruction(BaseILInstruction): def source_operand(self) -> Optional[ExpressionIndex]: 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)""" @@ -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: -- cgit v1.3.1