feat: добавлена команда сброса виртуальной машины

This commit is contained in:
ElectronixTM
2025-04-02 00:17:47 +03:00
parent 69234aac2d
commit 90040c9823

View File

@ -75,7 +75,8 @@ class Debugger:
"run": self._run,
"r": self._run,
"inspect": self._inspect,
"i": self._inspect
"i": self._inspect,
"reset": self._reset
}
def do_command(self, command: list[str]) -> str:
@ -84,6 +85,10 @@ class Debugger:
return "Unknown command"
return self._callbacks_table[callback_name](command[1:])
def _reset(self, args: list[str]) -> str:
self._vm.reset()
return "VM reseted"
def _step(self, args: list[str]) -> str:
try:
self._vm.step()