added syscall interface to debug variables

This commit is contained in:
Anton Lydike 2021-04-18 20:11:44 +02:00
parent bf4c705297
commit cd08cd4f70
2 changed files with 8 additions and 1 deletions

View File

@ -169,4 +169,10 @@ class SyscallInterface:
def get_syscall_symbols(self):
return {
('SCALL_' + name.upper()): num for num, name in SYSCALLS.items()
}
}
def __repr__(self):
return "{}(\n\tfiles={}\n)".format(
self.__class__.__name__,
self.open_files
)

View File

@ -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())