From 8d0f4806a7ad55710cb190e5a5c9388bd00c50a8 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Wed, 6 Mar 2019 23:40:34 +0100 Subject: Enable configuration of syscalls emulation and stop on exception. Signed-off-by: Pavel Pisa --- qtmips_osemu/ossyscall.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'qtmips_osemu/ossyscall.h') diff --git a/qtmips_osemu/ossyscall.h b/qtmips_osemu/ossyscall.h index 0c02699..bcb202f 100644 --- a/qtmips_osemu/ossyscall.h +++ b/qtmips_osemu/ossyscall.h @@ -57,12 +57,13 @@ int name(std::uint32_t &result, machine::Core *core, \ class OsSyscallExceptionHandler : public machine::ExceptionHandler { Q_OBJECT public: - OsSyscallExceptionHandler(); + OsSyscallExceptionHandler(bool known_syscall_stop = false, bool unknown_syscall_stop = false); bool handle_exception(machine::Core *core, machine::Registers *regs, machine::ExceptionCause excause, std::uint32_t inst_addr, std::uint32_t next_addr, std::uint32_t jump_branch_pc, bool in_delay_slot, std::uint32_t mem_ref_addr); OSSYCALL_HANDLER_DECLARE(syscall_default_handler); + OSSYCALL_HANDLER_DECLARE(do_sys_exit); OSSYCALL_HANDLER_DECLARE(do_sys_set_thread_area); OSSYCALL_HANDLER_DECLARE(do_sys_writev); OSSYCALL_HANDLER_DECLARE(do_sys_write); @@ -77,6 +78,8 @@ private: std::uint32_t brk_limit; std::uint32_t anonymous_base; std::uint32_t anonymous_last; + bool known_syscall_stop; + bool unknown_syscall_stop; }; #undef OSSYCALL_HANDLER_DECLARE -- cgit v1.2.3