From cd08cd4f70b22b6f209475161921e85dc05f1711 Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Sun, 18 Apr 2021 20:11:44 +0200 Subject: [PATCH] added syscall interface to debug variables --- riscemu/Syscall.py | 8 +++++++- riscemu/debug.py | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/riscemu/Syscall.py b/riscemu/Syscall.py index 5fa2332..7622154 100644 --- a/riscemu/Syscall.py +++ b/riscemu/Syscall.py @@ -169,4 +169,10 @@ class SyscallInterface: def get_syscall_symbols(self): return { ('SCALL_' + name.upper()): num for num, name in SYSCALLS.items() - } \ No newline at end of file + } + + def __repr__(self): + return "{}(\n\tfiles={}\n)".format( + self.__class__.__name__, + self.open_files + ) \ No newline at end of file diff --git a/riscemu/debug.py b/riscemu/debug.py index 2d93ccc..8cecc36 100644 --- a/riscemu/debug.py +++ b/riscemu/debug.py @@ -14,6 +14,7 @@ def launch_debug_session(cpu: 'CPU', mmu: 'MMU', reg: 'Registers', prompt=""): registers = reg memory = mmu mem = mmu + syscall_interface = cpu.syscall_int vars = globals() vars.update(locals())