From 74a30873db76348e57cef1e0b0fe48cb00924a68 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Tue, 23 Apr 2019 18:25:44 -0400 Subject: add eq for LLIL and MLIL instructions --- python/lowlevelil.py | 3 +++ python/mediumlevelil.py | 3 +++ 2 files changed, 6 insertions(+) (limited to 'python') diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 2609f761..90ecbd74 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -511,6 +511,9 @@ class LowLevelILInstruction(object): def __repr__(self): return "" % str(self) + def __eq__(self, value): + return self.function == value.function and self.expr_index == value.expr_index + @property def tokens(self): """LLIL tokens (read-only)""" diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py index d997fa76..e8d58f96 100644 --- a/python/mediumlevelil.py +++ b/python/mediumlevelil.py @@ -317,6 +317,9 @@ class MediumLevelILInstruction(object): def __repr__(self): return "" % str(self) + def __eq__(self, value): + return self.function == value.function and self.expr_index == value.expr_index + @property def tokens(self): """MLIL tokens (read-only)""" -- cgit v1.3.1