another directory rename: failstar -> fail
"failstar" sounds like a name for a cruise liner from the 80s. As "*" isn't a desirable part of directory names, just name the whole thing "fail/", the core parts being stored in "fail/core/". Additionally fixing two build system dependency issues: - missing jobserver -> protomessages dependency - broken bochs -> fail dependency (add_custom_target DEPENDS only allows plain file dependencies ... cmake for the win) git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@956 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
49
core/experiments/hscsimple/experiment.cc
Normal file
49
core/experiments/hscsimple/experiment.cc
Normal file
@ -0,0 +1,49 @@
|
||||
#include <iostream>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include "experiment.hpp"
|
||||
#include "SAL/SALInst.hpp"
|
||||
#include "SAL/bochs/BochsRegister.hpp"
|
||||
#include "controller/Event.hpp"
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
bool hscsimpleExperiment::run()
|
||||
{
|
||||
cout << "[HSC] experiment start" << endl;
|
||||
|
||||
// do funny things here...
|
||||
#if 0
|
||||
fi::BPEvent mainbp(0x00003c34);
|
||||
sal::simulator.addEventAndWait(&mainbp);
|
||||
cout << "[HSC] breakpoint reached, saving" << endl;
|
||||
sal::simulator.save("hello.main");
|
||||
#elif 1
|
||||
cout << "[HSC] restoring ..." << endl;
|
||||
sal::simulator.restore("hello.main");
|
||||
cout << "[HSC] restored!" << endl;
|
||||
|
||||
cout << "[HSC] waiting for last square() instruction" << endl;
|
||||
fi::BPEvent breakpoint(0x3c9e); // square(x) ret instruction
|
||||
sal::simulator.addEventAndWait(&breakpoint);
|
||||
cout << "[HSC] injecting hellish fault" << endl;
|
||||
#if BX_SUPPORT_X86_64
|
||||
int reg = sal::RID_RAX;
|
||||
#else
|
||||
int reg = sal::RID_EAX;
|
||||
#endif
|
||||
sal::simulator.getRegisterManager().getSetOfType(sal::RT_GP).getRegister(reg)->setData(666);
|
||||
cout << "[HSC] waiting for last main() instruction" << endl;
|
||||
breakpoint.setWatchInstructionPointer(0x3c92);
|
||||
sal::simulator.addEventAndWait(&breakpoint);
|
||||
|
||||
cout << "[HSC] reached" << endl;
|
||||
|
||||
// FIXME this shouldn't fail:
|
||||
sal::simulator.addEventAndWait(&breakpoint);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user