aboutsummaryrefslogtreecommitdiff
path: root/qtmips_gui/mainwindow.cpp
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-08 21:54:50 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-13 23:18:47 +0100
commit99364fff03268f3a5b9257430369003c7d91cbfb (patch)
tree368f840da45fe4f58f26aac7f3dfaa0da3ecf2a7 /qtmips_gui/mainwindow.cpp
parent460d00b0caf65a4483d3e029495cc9340bb3e785 (diff)
downloadqtmips-99364fff03268f3a5b9257430369003c7d91cbfb.tar.gz
qtmips-99364fff03268f3a5b9257430369003c7d91cbfb.tar.bz2
qtmips-99364fff03268f3a5b9257430369003c7d91cbfb.zip
Initial attempt to as operating system syscall handler.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_gui/mainwindow.cpp')
-rw-r--r--qtmips_gui/mainwindow.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/qtmips_gui/mainwindow.cpp b/qtmips_gui/mainwindow.cpp
index 3e95a8f..0482b11 100644
--- a/qtmips_gui/mainwindow.cpp
+++ b/qtmips_gui/mainwindow.cpp
@@ -35,6 +35,7 @@
#include "mainwindow.h"
#include "aboutdialog.h"
+#include "ossyscall.h"
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) {
machine = nullptr;
@@ -146,6 +147,11 @@ void MainWindow::create_core(const machine::MachineConfig &config) {
set_speed(); // Update machine speed to current settings
+#if 1
+ machine->register_exception_handler(machine::EXCAUSE_SYSCALL,
+ new osemu::OsSyscallExceptionHandler);
+#endif
+
// Connect machine signals and slots
connect(ui->actionRun, SIGNAL(triggered(bool)), machine, SLOT(play()));
connect(ui->actionPause, SIGNAL(triggered(bool)), machine, SLOT(pause()));