@ -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:
"""
@ -67,3 +67,8 @@ class MMU:
# debugging interactions:
def dump(self, addr, *args, **kwargs):
self.get_sec_containing(addr).dump(addr, *args, **kwargs)
return "MMU(\n\t{}\n)".format(
"\n\t".join(repr(x) for x in self.sections)