L4Sys: refactoring

* more more stuff into functions
* try to have generic experiment code only once

Change-Id: I4f037bd972243665a10941fcc3607f015b0bb1f9
This commit is contained in:
Björn Döbel
2013-09-11 16:17:12 +02:00
parent 0b2ab41c2f
commit 8caa63397a
2 changed files with 273 additions and 298 deletions

View File

@ -112,16 +112,25 @@ private:
* Run until L4SYS_FUNC_ENTRY and save state (experiment preparation,
* phase 1)
*/
void startAndSaveInitState(fail::BPSingleListener& bp);
void startAndSaveInitState(fail::BPSingleListener* bp);
/**
* Collect list of executed instructions, considering instruction
* filtering if configured (experiment preparation, phase 2).
*/
void collectInstructionTrace(fail::BPSingleListener& bp);
void collectInstructionTrace(fail::BPSingleListener* bp);
/**
* Perform the golden run (experiment preparation, phase 3)
*/
void goldenRun(fail::BPSingleListener& bp);
void goldenRun(fail::BPSingleListener* bp);
void validatePrerequisites();
void getJobParameters();
void readGoldenRun(std::string& target);
fail::BPSingleListener* prepareMemoryExperiment(int ip, int offset, int dataAddress);
fail::BPSingleListener* prepareRegisterExperiment(int ip, int offset, int dataAddress);
void doMemoryInjection(int address, int bit);
void doRegisterInjection(int regDesc, int bit);
};
#endif // __L4SYS_EXPERIMENT_HPP__