Experiment updates due to last commit.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1449 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
adrian
2012-07-12 10:45:39 +00:00
parent a78911702a
commit 2076d21e61
13 changed files with 177 additions and 177 deletions

View File

@ -12,8 +12,8 @@
#include "sal/SALInst.hpp"
#include "sal/Memory.hpp"
#include "sal/bochs/BochsRegister.hpp"
#include "sal/bochs/BochsEvents.hpp"
#include "sal/Event.hpp"
#include "sal/bochs/BochsListener.hpp"
#include "sal/Listener.hpp"
using namespace std;
@ -77,25 +77,25 @@ bool VEZSExperiment::run()
// - #loop iterations before/after FI
// catch traps as "extraordinary" ending
TrapEvent ev_trap(ANY_TRAP);
simulator.addEvent(&ev_trap);
TrapListener ev_trap(ANY_TRAP);
simulator.addListener(&ev_trap);
// jump outside text segment
BPRangeEvent ev_below_text(ANY_ADDR, OOSTUBS_TEXT_START - 1);
BPRangeEvent ev_beyond_text(OOSTUBS_TEXT_END + 1, ANY_ADDR);
simulator.addEvent(&ev_below_text);
simulator.addEvent(&ev_beyond_text);
BPRangeListener ev_below_text(ANY_ADDR, OOSTUBS_TEXT_START - 1);
BPRangeListener ev_beyond_text(OOSTUBS_TEXT_END + 1, ANY_ADDR);
simulator.addListener(&ev_below_text);
simulator.addListener(&ev_beyond_text);
// timeout (e.g., stuck in a HLT instruction)
// 10000us = 500000 instructions
TimerEvent ev_timeout(1000000); // 50,000,000 instructions !!
simulator.addEvent(&ev_timeout);
TimerListener ev_timeout(1000000); // 50,000,000 instructions !!
simulator.addListener(&ev_timeout);
// remaining instructions until "normal" ending
BPSingleEvent ev_end(ANY_ADDR);
BPSingleListener ev_end(ANY_ADDR);
ev_end.setCounter(OOSTUBS_NUMINSTR - instr_offset);
simulator.addEvent(&ev_end);
simulator.addListener(&ev_end);
// Start simulator and wait for any result
BaseEvent* ev = simulator.waitAny();
BaseListener* ev = simulator.resume();
// record latest IP regardless of result
injection_ip = simulator.getRegisterManager().getInstructionPointer();
@ -115,7 +115,7 @@ bool VEZSExperiment::run()
log << "@ ip 0x" << hex << injection_ip << endl;
// explicitly remove all events before we leave their scope
// FIXME event destructors should remove them from the queues
simulator.clearEvents();
simulator.clearListeners();
}
#endif