Closed xusheng6 closed 10 months ago
This is a simple fix in api/python/basicblock.py
:
def __repr__(self):
arch = self.arch
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}>"
Following my best guess at current convention, there is no leading "0x" and the letter characters are lowercase.
Many unit tests change as a result, having stored the decimal representation:
The question is: Is everyone in agreement that we should change to hex representation?
This is a simple fix in
api/python/basicblock.py
:def __repr__(self): arch = self.arch 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}>"
Following my best guess at current convention, there is no leading "0x" and the letter characters are lowercase.
Many unit tests change as a result, having stored the decimal representation:
The question is: Is everyone in agreement that we should change to hex representation?
We want to keep the address in decimal if it is an IL basic block because we use decimal for IL index
As there are subclasses for each BasicBlock type this is simple to fix