mid instruction exception handler

This commit is contained in:
Kelvin Sherlock 2013-09-02 19:59:11 -04:00
parent a97d8b08fe
commit a02e5ccec8
1 changed files with 9 additions and 0 deletions

View File

@ -588,6 +588,13 @@ void MemoryLogger(uint32_t address, int size, int readWrite, uint32_t value)
}
}
void MidInstructionExceptionFunc()
{
// todo - cpu exception?
fprintf(stderr, "Mid Instruction Exception!\n");
//throw std::runtime_error::runtime_error("mid instruction exception");
}
#define MPW_VERSION "0.7.1 [kf]"
void help()
@ -920,6 +927,8 @@ int main(int argc, char **argv)
cpuSetALineExceptionFunc(ToolBox::dispatch);
cpuSetFLineExceptionFunc(MPW::dispatch);
cpuSetMidInstructionExceptionFunc(MidInstructionExceptionFunc);
if (Flags.traceGlobals) //memorySetGlobalLog(kGlobalSize);
memorySetLoggingFunc(MemoryLogger);