From 942f3c73fd22cddecc03b45d457a8a20292e9d94 Mon Sep 17 00:00:00 2001 From: ElectronixTM Date: Mon, 31 Mar 2025 22:03:12 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D1=81=D0=BE=D0=BA=D1=80=D0=B0=D1=89=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D0=B5=20=D0=BA=D0=BE=D0=BC=D0=B0=D0=BD=D0=B4=D1=8B=20?= =?UTF-8?q?=D0=B2=20=D0=BF=D1=83=D0=BB=20=D0=B8=20=D0=B2=D0=BE=D0=B7=D0=BC?= =?UTF-8?q?=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=82=D0=B5=D0=BA=D1=83?= =?UTF-8?q?=D1=89=D0=B5=D0=B9=20=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=B8=D1=81=D1=85=D0=BE=D0=B4=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/dpdebugger.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/dpdebugger.py b/src/dpdebugger.py index b799d6e..bf9acbc 100644 --- a/src/dpdebugger.py +++ b/src/dpdebugger.py @@ -65,11 +65,17 @@ class Debugger: def __init_callbacks__(self): self._callbacks_table = { "step": self._step, + "s": self._step, "continue": self._continue, + "c": self._continue, "breakpoint": self._breakpoint, + "b": self._breakpoint, "print": self._print, + "p": self._print, "run": self._run, - "inspect": self._inspect + "r": self._run, + "inspect": self._inspect, + "i": self._inspect } def do_command(self, command: list[str]) -> str: @@ -87,6 +93,9 @@ class Debugger: return f"Virtual machine exception: {e.message}" return "" + def get_current_source_line_number(self) -> int: + return self._dbg_dict["instructions"][self._vm.pc.value]['srcline'] + def _continue(self, args: list[str]) -> str: try: self._vm.continue_()