diff options
Diffstat (limited to 'python/basicblock.py')
| -rw-r--r-- | python/basicblock.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/python/basicblock.py b/python/basicblock.py index 712d1d33..cd9227d5 100644 --- a/python/basicblock.py +++ b/python/basicblock.py @@ -118,10 +118,17 @@ class BasicBlock: def __repr__(self): arch = self.arch - if arch: - return f"<{self.__class__.__name__}: {arch.name}@{self.start:#x}-{self.end:#x}>" + if self.is_il: + # IL indices are shown as decimal + if arch: + return f"<{self.__class__.__name__}: {arch.name}@{self.start}-{self.end}>" + else: + return f"<{self.__class__.__name__}: {self.start}-{self.end}>" else: - return f"<{self.__class__.__name__}: {self.start:#x}-{self.end:#x}>" + if arch: + return f"<{self.__class__.__name__}: {arch.name}@{self.start:#x}-{self.end:#x}>" + else: + return f"<{self.__class__.__name__}: {self.start:#x}-{self.end:#x}>" def __len__(self): return int(core.BNGetBasicBlockLength(self.handle)) |
