summaryrefslogtreecommitdiff
path: root/python/lowlevelil.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/lowlevelil.py')
-rw-r--r--python/lowlevelil.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/python/lowlevelil.py b/python/lowlevelil.py
index 419e8513..c80fcd0d 100644
--- a/python/lowlevelil.py
+++ b/python/lowlevelil.py
@@ -187,7 +187,9 @@ class LowLevelILInstruction(object):
value = tokens[i].value
size = tokens[i].size
operand = tokens[i].operand
- result.append(function.InstructionTextToken(token_type, text, value, size, operand))
+ context = tokens[i].context
+ address = tokens[i].address
+ result.append(function.InstructionTextToken(token_type, text, value, size, operand, context, address))
core.BNFreeInstructionText(tokens, count.value)
return result
@@ -251,6 +253,16 @@ class LowLevelILFunction(object):
def __del__(self):
core.BNFreeLowLevelILFunction(self.handle)
+ def __eq__(self, value):
+ if not isinstance(value, LowLevelILFunction):
+ return False
+ return ctypes.addressof(self.handle.contents) == ctypes.addressof(value.handle.contents)
+
+ def __ne__(self, value):
+ if not isinstance(value, LowLevelILFunction):
+ return True
+ return ctypes.addressof(self.handle.contents) != ctypes.addressof(value.handle.contents)
+
@property
def current_address(self):
"""Current IL Address (read/write)"""