From cc850ebdf753a4fa8643e6b3e596d212251f010c Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Tue, 3 Sep 2019 15:47:28 -0400 Subject: repr for llil and mlil blocks now uses decimal indexes to match the UI --- python/mediumlevelil.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'python/mediumlevelil.py') diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py index a90fb0aa..8400d33a 100644 --- a/python/mediumlevelil.py +++ b/python/mediumlevelil.py @@ -1172,6 +1172,13 @@ class MediumLevelILBasicBlock(basicblock.BasicBlock): def __hash__(self): return hash((self.start, self.end, self.il_function)) + def __repr__(self): + arch = self.arch + if arch: + return "" % (arch.name, self.start, self.end) + else: + return "" % (self.start, self.end) + def __contains__(self, instruction): if type(instruction) != MediumLevelILInstruction or instruction.il_basic_block != self: return False -- cgit v1.3.1