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:
106
core/SAL/bochs/BochsController.hpp
Normal file
106
core/SAL/bochs/BochsController.hpp
Normal file
@ -0,0 +1,106 @@
|
||||
#ifndef __BOCHS_CONTROLLER_HPP__
|
||||
#define __BOCHS_CONTROLLER_HPP__
|
||||
|
||||
#define DEBUG
|
||||
|
||||
#include <string>
|
||||
#include <cassert>
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "failbochs.hpp"
|
||||
|
||||
#include "../SimulatorController.hpp"
|
||||
#include "../../controller/Event.hpp"
|
||||
|
||||
#include "../../../bochs/bochs.h"
|
||||
#include "../../../bochs/cpu/cpu.h"
|
||||
#include "../../../bochs/config.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
namespace fi { class ExperimentFlow; }
|
||||
|
||||
/// Simulator Abstraction Layer namespace
|
||||
namespace sal
|
||||
{
|
||||
|
||||
/**
|
||||
* \class BochsController
|
||||
* Bochs-specific implementation of a SimulatorController.
|
||||
*/
|
||||
class BochsController : public SimulatorController
|
||||
{
|
||||
private:
|
||||
/**
|
||||
* stores the current flow for save/restore-operations
|
||||
*/
|
||||
fi::ExperimentFlow* m_CurrFlow;
|
||||
#ifdef DEBUG
|
||||
unsigned m_Regularity;
|
||||
unsigned m_Counter;
|
||||
std::ostream* m_pDest;
|
||||
#endif
|
||||
public:
|
||||
// Initialize the controller.
|
||||
BochsController();
|
||||
~BochsController();
|
||||
/* ********************************************************************
|
||||
* Standard Event Handler API (SEH-API):
|
||||
* ********************************************************************/
|
||||
/**
|
||||
* Instruction pointer modification handler. This method is called (from
|
||||
* the CPULoop aspect) every time when the Bochs-internal IP changes.
|
||||
* @param instrPtr
|
||||
*/
|
||||
void onInstrPtrChanged(address_t instrPtr);
|
||||
/* ********************************************************************
|
||||
* Simulator Controller & Access API (SCA-API):
|
||||
* ********************************************************************/
|
||||
/**
|
||||
* Save simulator state.
|
||||
* @param path Location to store state information
|
||||
*/
|
||||
void save(const string& path);
|
||||
/**
|
||||
* Save finished: Callback from Simulator
|
||||
*/
|
||||
void saveDone();
|
||||
/**
|
||||
* Restore simulator state. Clears all Events.
|
||||
* @param path Location to previously saved state information
|
||||
*/
|
||||
void restore(const string& path);
|
||||
/**
|
||||
* Restore finished: Callback from Simulator
|
||||
*/
|
||||
void restoreDone();
|
||||
/**
|
||||
* Reboot simulator. Clears all Events.
|
||||
*/
|
||||
void reboot();
|
||||
/**
|
||||
* Reboot finished: Callback from Simulator
|
||||
*/
|
||||
void rebootDone();
|
||||
/**
|
||||
* Terminate simulator
|
||||
* @param exCode Individual exit code
|
||||
*/
|
||||
void terminate(int exCode = EXIT_SUCCESS);
|
||||
#ifdef DEBUG
|
||||
/**
|
||||
* Enables instruction pointer debugging output.
|
||||
* @param regularity the output regularity; 1 to display every
|
||||
* instruction pointer, 0 to disable
|
||||
* @param dest specifies the output destition; defaults to \c std::cout
|
||||
*/
|
||||
void dbgEnableInstrPtrOutput(unsigned regularity, std::ostream* dest = &cout);
|
||||
#endif
|
||||
};
|
||||
|
||||
} // end-of-namespace: sal
|
||||
|
||||
#endif /* __BOCHS_CONTROLLER_HPP__ */
|
||||
Reference in New Issue
Block a user