Fail* directories reorganized, Code-cleanup (-> coding-style), Typos+comments fixed.

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1321 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
adrian
2012-06-08 20:09:43 +00:00
parent d474a5b952
commit 2575604b41
866 changed files with 1848 additions and 1879 deletions

View File

@ -0,0 +1,46 @@
#include <iostream>
#include "experiment.hpp"
#include "MHTestCampaign.hpp"
#include "sal/SALInst.hpp"
#include "sal/Register.hpp"
#include "sal/Event.hpp"
// FIXME: You should provide a dependency check here!
using namespace std;
using namespace fail;
bool MHTestExperiment::run()
{
cout << "[MHTestExperiment] Let's go" << endl;
#if 0
BPSingleEvent mainbp(0x00003c34);
simulator.addEventAndWait(&mainbp);
cout << "[MHTestExperiment] breakpoint reached, saving" << endl;
simulator.save("hello.main");
#else
MHExperimentData par;
if (m_jc.getParam(par)) {
int num = par.msg.input();
cout << "[MHExperiment] stepping " << num << " instructions" << endl;
if (num > 0) {
BPSingleEvent nextbp(ANY_ADDR);
nextbp.setCounter(num);
simulator.addEventAndWait(&nextbp);
}
address_t instr = simulator.getRegisterManager().getInstructionPointer();
cout << "[MHTestExperiment] Reached instruction: "
<< hex << instr
<< endl;
par.msg.set_output(instr);
m_jc.sendResult(par);
} else {
cout << "No data for me? :(" << endl;
}
#endif
simulator.clearEvents(this);
simulator.terminate();
return true;
}