87 if (minorErrors > 0) {
88 for (
size_t i = 0; i < minorErrors; ++i) {
89 std::cerr <<
"warning: runtime error: "
96 if (fatalErrors > 0) {
97 for (
size_t i = 0; i < fatalErrors; ++i) {
98 std::cerr <<
"error: runtime error: "
106 <<
"Current PC: " << currentPC <<
" last PC: " << lastPC
107 <<
" cycle count: " << cycleCount << std::endl;
192 std::string command =
"";
#define assert(condition)
UInt32 InstructionAddress
#define SIM_INTERP_QUIT_COMMAND
The command used to quit the command line interface.
#define SIM_COMMAND_PROMPT
The command prompt of the simulator interpreter.
CycleCount ClockCycleCount
Alias for ClockCycleCount.
#define SIM_DEFAULT_COMMAND_LOG
The default command log file name.
@ SRE_RUNTIME_ERROR
A fatal runtime error occured in the simulated program.
static CmdLineOptions * cmdLineOptions()
virtual void setInputHistoryLog(const std::string &historyFilename)
virtual void initialize(std::string defPrompt="", FILE *in=stdin, FILE *out=stdout, FILE *err=stderr)=0
virtual std::string readLine(std::string prompt="")=0
SimulatorFrontend & target_
Simulator frontend to use.
RuntimeErrorReporter(SimulatorFrontend &target)
virtual ~RuntimeErrorReporter()
virtual void handleEvent()
virtual std::string result()
@ SE_RUNTIME_ERROR
Sent when a runtime error is detected in the simulated program.
SimulatorInterpreter * interpreter_
RuntimeErrorReporter * errorReporter_
SimulatorCmdLineOptions * options_
SimulatorInterpreterContext * context_
SimulatorFrontend & simFront_
virtual void interpreteAndPrintResults(const TCEString &scriptString)
SimulationEventHandler & eventHandler()
ClockCycleCount cycleCount() const
virtual InstructionAddress lastExecutedInstruction(int coreId=-1) const
void clearProgramErrorReports()
std::size_t programErrorReportCount(RuntimeErrorSeverity severity)
@ RES_FATAL
Fatal runtime error, there is a serious error in the simulated program, thus it makes no sense to go ...
@ RES_MINOR
Minor runtime error, no abort necessary.
InstructionAddress programCounter() const
bool isCompiledSimulation() const
std::string programErrorReport(RuntimeErrorSeverity severity, std::size_t index)
void prepareToStop(StopReason reason)
bool isQuitCommandGiven() const
virtual bool interpret(const std::string &commandLine)