summaryrefslogtreecommitdiff
path: root/python/mediumlevelil.py
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2020-01-27 00:02:51 -0500
committerJordan Wiens <jordan@psifertex.com>2020-01-27 00:02:51 -0500
commit79986dd0d6429ddca15645e7ab09b71ed2ae4386 (patch)
treec74e9318b43a40895245deb83f78d0d7553d09dd /python/mediumlevelil.py
parentd13130eb6da9cfce5f0d09f311394ba3d90a6e03 (diff)
better reprs for llil and mlil functions
Diffstat (limited to 'python/mediumlevelil.py')
-rw-r--r--python/mediumlevelil.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py
index ba352503..21c50817 100644
--- a/python/mediumlevelil.py
+++ b/python/mediumlevelil.py
@@ -824,6 +824,13 @@ class MediumLevelILFunction(object):
return True
return ctypes.addressof(self.handle.contents) != ctypes.addressof(value.handle.contents)
+ def __repr__(self):
+ arch = self.source_function.arch
+ if arch:
+ return "<mlil func: %s@%#x>" % (arch.name, self.source_function.start)
+ else:
+ return "<mlil func: %#x>" % self.source_function.start
+
@property
def current_address(self):
"""Current IL Address (read/write)"""