Making the debugger spawn on invalid rom exceptions (invalid address access, invalid opcode...) & starting the dissasembly view

This commit is contained in:
Anonymus Raccoon
2020-03-25 22:33:12 +01:00
parent af58aca1a2
commit 1a6d0e907b
5 changed files with 69 additions and 42 deletions

View File

@@ -8,6 +8,8 @@
#include <QMenuBar>
#include <iostream>
#include "QtSFML.hpp"
#include "../../Exceptions/InvalidOpcode.hpp"
#include "../../Exceptions/InvalidAddress.hpp"
#ifdef Q_WS_X11
#include <Qt/qx11info_x11.h>
@@ -84,6 +86,10 @@ namespace ComSquare::Renderer
{
try {
this->_snes.update();
} catch (InvalidOpcode &e) {
this->_snes.enableCPUDebugging();
} catch (InvalidAddress &e) {
this->_snes.enableCPUDebugging();
} catch (std::exception &e) {
std::cerr << "An error occurred: " << e.what() << std::endl;
QApplication::quit();