Expand Protocol for own Fail-Stop-Function
This commit is contained in:
@ -240,7 +240,7 @@ void L4SysExperiment::startAndSaveInitState(fail::BPSingleListener* bp)
|
|||||||
|
|
||||||
void L4SysExperiment::CR3run(fail::BPSingleListener *bp)
|
void L4SysExperiment::CR3run(fail::BPSingleListener *bp)
|
||||||
{
|
{
|
||||||
log << "CR3Run: Watching for instruction " << hex << L4SYS_FUNC_ENTRY << endl;
|
log << "CR_3Run: Watching for instruction " << hex << L4SYS_FUNC_ENTRY << endl;
|
||||||
bp->setWatchInstructionPointer(L4SYS_FUNC_ENTRY);
|
bp->setWatchInstructionPointer(L4SYS_FUNC_ENTRY);
|
||||||
simulator.addListenerAndResume(bp);
|
simulator.addListenerAndResume(bp);
|
||||||
log << "Reached entry point @ " << hex << bp->getTriggerInstructionPointer()
|
log << "Reached entry point @ " << hex << bp->getTriggerInstructionPointer()
|
||||||
@ -471,10 +471,11 @@ void L4SysExperiment::collectInstructionTrace(fail::BPSingleListener* bp)
|
|||||||
simulator.addListener(bp);
|
simulator.addListener(bp);
|
||||||
++count;
|
++count;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
if (curr_addr < 0xC0000000) // XXX filter for kernel-only experiment
|
if (curr_addr < 0xC0000000) // XXX filter for kernel-only experiment
|
||||||
continue;
|
continue;
|
||||||
|
#endif
|
||||||
|
|
||||||
currtime = simulator.getTimerTicks();
|
currtime = simulator.getTimerTicks();
|
||||||
deltatime = currtime - prevtime;
|
deltatime = currtime - prevtime;
|
||||||
|
|
||||||
@ -815,6 +816,10 @@ bool L4SysExperiment::run()
|
|||||||
BPSingleListener ev_longjmp(L4SYS_BREAK_LONGJMP);
|
BPSingleListener ev_longjmp(L4SYS_BREAK_LONGJMP);
|
||||||
simulator.addListener(&ev_longjmp);
|
simulator.addListener(&ev_longjmp);
|
||||||
|
|
||||||
|
//If we come to our own exit function, we can stop
|
||||||
|
BPSingleListener ev_exit(L4SYS_BREAK_EXIT);
|
||||||
|
simulator.addListener(&ev_exit);
|
||||||
|
|
||||||
unsigned instr_left = L4SYS_TOTINSTR - instr_offset; // XXX offset is in NUMINSTR, TOTINSTR is higher
|
unsigned instr_left = L4SYS_TOTINSTR - instr_offset; // XXX offset is in NUMINSTR, TOTINSTR is higher
|
||||||
BPSingleListener ev_incomplete(ANY_ADDR, L4SYS_ADDRESS_SPACE);
|
BPSingleListener ev_incomplete(ANY_ADDR, L4SYS_ADDRESS_SPACE);
|
||||||
/*
|
/*
|
||||||
@ -870,6 +875,11 @@ bool L4SysExperiment::run()
|
|||||||
result->set_resulttype(param->msg.TIMEOUT);
|
result->set_resulttype(param->msg.TIMEOUT);
|
||||||
result->set_resultdata(simulator.getCPU(0).getInstructionPointer());
|
result->set_resultdata(simulator.getCPU(0).getInstructionPointer());
|
||||||
result->set_output(sanitised(currentOutput.c_str()));
|
result->set_output(sanitised(currentOutput.c_str()));
|
||||||
|
} else if (ev == &ev_exit) {
|
||||||
|
log << "Result FAILSTOP" << endl;
|
||||||
|
result->set_resulttype(param->msg.FAILSTOP);
|
||||||
|
result->set_resultdata(simulator.getCPU(0).getInstructionPointer());
|
||||||
|
result->set_output(sanitised(currentOutput.c_str()));
|
||||||
} else {
|
} else {
|
||||||
log << "Result WTF?" << endl;
|
log << "Result WTF?" << endl;
|
||||||
stringstream ss;
|
stringstream ss;
|
||||||
|
|||||||
@ -31,6 +31,7 @@ message L4SysProtoMsg {
|
|||||||
TIMEOUT = 3;
|
TIMEOUT = 3;
|
||||||
WRONG = 4;
|
WRONG = 4;
|
||||||
UNKNOWN = 5;
|
UNKNOWN = 5;
|
||||||
|
FAILSTOP = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
required DatabaseCampaignMessage fsppilot = 1;
|
required DatabaseCampaignMessage fsppilot = 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user