added __repr__ to MMU and LoadedMemeorySection
This commit is contained in:
parent
4b26ab6774
commit
c4a28c9d1b
@ -211,6 +211,14 @@ class LoadedMemorySection:
|
||||
else:
|
||||
print(FMT_BOLD + FMT_MAGENTA + "..." + FMT_NONE)
|
||||
|
||||
def __repr__(self):
|
||||
return "{} at 0x{:08X} (size={}bytes, flags={}, owner={})".format(
|
||||
self.__class__.__name__,
|
||||
self.base,
|
||||
self.size,
|
||||
self.flags,
|
||||
self.owner
|
||||
)
|
||||
|
||||
class LoadedExecutable:
|
||||
"""
|
||||
|
@ -66,4 +66,9 @@ class MMU:
|
||||
|
||||
# debugging interactions:
|
||||
def dump(self, addr, *args, **kwargs):
|
||||
self.get_sec_containing(addr).dump(addr, *args, **kwargs)
|
||||
self.get_sec_containing(addr).dump(addr, *args, **kwargs)
|
||||
|
||||
def __repr__(self):
|
||||
return "MMU(\n\t{}\n)".format(
|
||||
"\n\t".join(repr(x) for x in self.sections)
|
||||
)
|
Loading…
Reference in New Issue
Block a user