27 lines
763 B
Python
27 lines
763 B
Python
from . import CustomInstruction
|
|
|
|
class PrintVMDump(CustomInstruction):
|
|
"""
|
|
PrintVMDump() prints ScEpTIC memory dump
|
|
"""
|
|
|
|
def run(self, update_program_counter=True):
|
|
print("START DUMP >")
|
|
print()
|
|
print(self._vmstate.register_file.pc.pc_tree())
|
|
print("[REGISTER FILE]")
|
|
print(self._vmstate.register_file.get_visual_dump())
|
|
print()
|
|
print("[GST]")
|
|
print(self._vmstate.memory.gst.get_visual_dump())
|
|
print()
|
|
print("[STACK]")
|
|
print(self._vmstate.memory.stack.get_visual_dump())
|
|
print()
|
|
print("[HEAP]")
|
|
print(self._vmstate.memory.heap.get_visual_dump())
|
|
print()
|
|
print("END DUMP <")
|
|
|
|
super().run(update_program_counter)
|