aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-08 13:53:32 +0100
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-02-08 13:53:32 +0100
commitbd11856c5915ef52ca3325a27fca07049ab2215a (patch)
tree1716e626659bf2c645f8d4cf4788f7c965543867 /qtmips_machine
parent789186fd63fb3fb63af1d8875cbe43609321b9d8 (diff)
downloadqtmips-bd11856c5915ef52ca3325a27fca07049ab2215a.tar.gz
qtmips-bd11856c5915ef52ca3325a27fca07049ab2215a.tar.bz2
qtmips-bd11856c5915ef52ca3325a27fca07049ab2215a.zip
Make function to register exception handler accessible from outside.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
Diffstat (limited to 'qtmips_machine')
-rw-r--r--qtmips_machine/qtmipsmachine.cpp6
-rw-r--r--qtmips_machine/qtmipsmachine.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/qtmips_machine/qtmipsmachine.cpp b/qtmips_machine/qtmipsmachine.cpp
index b691645..2942bec 100644
--- a/qtmips_machine/qtmipsmachine.cpp
+++ b/qtmips_machine/qtmipsmachine.cpp
@@ -199,3 +199,9 @@ void QtMipsMachine::set_status(enum Status st) {
if (change)
emit status_change(st);
}
+
+void QtMipsMachine::register_exception_handler(ExceptionCause excause,
+ ExceptionHandler *exhandler) {
+ if (cr != nullptr)
+ cr->register_exception_handler(excause, exhandler);
+}
diff --git a/qtmips_machine/qtmipsmachine.h b/qtmips_machine/qtmipsmachine.h
index 48dc786..7a128f6 100644
--- a/qtmips_machine/qtmipsmachine.h
+++ b/qtmips_machine/qtmipsmachine.h
@@ -77,6 +77,8 @@ public:
enum Status status();
bool exited();
+ void register_exception_handler(ExceptionCause excause, ExceptionHandler *exhandler);
+
public slots:
void play();
void pause();