OpenASIP
2.0
|
Public Member Functions | |
RuntimeErrorReporter (SimulatorFrontend &target) | |
virtual | ~RuntimeErrorReporter () |
virtual void | handleEvent () |
Public Member Functions inherited from Listener | |
Listener () | |
virtual | ~Listener () |
virtual void | handleEvent (int event) |
Private Attributes | |
SimulatorFrontend & | target_ |
Simulator frontend to use. More... | |
Class that catches simulated program runtime error events and prints the error reports to stderr.
Definition at line 53 of file SimulatorCLI.cc.
|
inline |
Constructor.
Registers itself to the SimulationEventHandler to listen to runtime error events.
target | The target SimulatorFrontend instance. |
Definition at line 63 of file SimulatorCLI.cc.
References SimulatorFrontend::eventHandler(), Informer::registerListener(), and SimulationEventHandler::SE_RUNTIME_ERROR.
|
inlinevirtual |
Definition at line 69 of file SimulatorCLI.cc.
References SimulatorFrontend::eventHandler(), SimulationEventHandler::SE_RUNTIME_ERROR, target_, and Informer::unregisterListener().
|
inlinevirtual |
Handles the runtime error event by printing and error report to stderr and stopping simulation in case it's a fatal error.
Reimplemented from Listener.
Definition at line 78 of file SimulatorCLI.cc.
References SimulatorFrontend::clearProgramErrorReports(), SimulatorFrontend::cycleCount(), SimulatorFrontend::lastExecutedInstruction(), SimulatorFrontend::prepareToStop(), SimulatorFrontend::programCounter(), SimulatorFrontend::programErrorReport(), SimulatorFrontend::programErrorReportCount(), SimulatorFrontend::RES_FATAL, SimulatorFrontend::RES_MINOR, SRE_RUNTIME_ERROR, and target_.
|
private |
Simulator frontend to use.
Definition at line 113 of file SimulatorCLI.cc.
Referenced by handleEvent(), and ~RuntimeErrorReporter().