diff options
Diffstat (limited to 'qtmips_gui')
-rw-r--r-- | qtmips_gui/NewDialog.ui | 30 | ||||
-rw-r--r-- | qtmips_gui/mainwindow.cpp | 6 | ||||
-rw-r--r-- | qtmips_gui/qtmips_gui.pro | 5 |
3 files changed, 39 insertions, 2 deletions
diff --git a/qtmips_gui/NewDialog.ui b/qtmips_gui/NewDialog.ui index b31a011..4171e73 100644 --- a/qtmips_gui/NewDialog.ui +++ b/qtmips_gui/NewDialog.ui @@ -279,6 +279,36 @@ <string>Data cache</string> </attribute> </widget> + <widget class="QWidget" name="tab_os_emulation"> + <property name="enabled"> + <bool>true</bool> + </property> + <attribute name="title"> + <string>OS Emulation</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout_7"> + <item> + <widget class="QCheckBox" name="osemu_enablecheck"> + <property name="text"> + <string>Enable OS Emulation</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_4"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>21</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> </widget> </item> <item> 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())); diff --git a/qtmips_gui/qtmips_gui.pro b/qtmips_gui/qtmips_gui.pro index 56e6909..02511df 100644 --- a/qtmips_gui/qtmips_gui.pro +++ b/qtmips_gui/qtmips_gui.pro @@ -5,6 +5,7 @@ CONFIG += c++11 TEMPLATE = app +LIBS += -L$$OUT_PWD/../qtmips_osemu/ -lqtmips_osemu LIBS += -L$$OUT_PWD/../qtmips_machine/ -lqtmips_machine -lelf DOLAR=$ @@ -13,8 +14,8 @@ unix: LIBS += \ -Wl,-rpath,\'$${DOLAR}$${DOLAR}ORIGIN/../lib\' \ # --enable-new-dtags \ -INCLUDEPATH += $$PWD/../qtmips_machine -DEPENDPATH += $$PWD/../qtmips_machine +INCLUDEPATH += $$PWD/../qtmips_machine $$PWD/../qtmips_osemu +DEPENDPATH += $$PWD/../qtmips_machine $$PWD/../qtmips_osemu QMAKE_CXXFLAGS += -std=c++0x QMAKE_CXXFLAGS_DEBUG += -ggdb |