Revert "gem5: save/restore moved to Gem5Controller"

This reverts commit d525005990.
This commit is contained in:
Richard Hellwig
2013-05-22 17:38:56 +02:00
parent dd81913f2c
commit a6c24489f6
4 changed files with 56 additions and 15 deletions

View File

@ -1,13 +1,10 @@
#include "Gem5Controller.hpp"
//#include "Gem5Connector.hpp"
#include "../Listener.hpp"
#include "Gem5Wrapper.hpp"
#include "base/trace.hh"
#include "debug/FailState.hh"
#include "sim/root.hh"
namespace fail {
void Gem5Controller::startup()
@ -37,23 +34,16 @@ Gem5Controller::~Gem5Controller()
delete m_Mem;
}
void Gem5Controller::save(const std::string &path)
bool Gem5Controller::save(const std::string &path)
{
DPRINTF(FailState, "Saving state to %s.\n", path);
Root* root = Root::root();
root->Serializable::serializeAll(path);
// connector.save(path); // FIXME: not working?!
return true;
}
void Gem5Controller::restore(const std::string &path)
{
// FIXME: not working currently
Root* root = Root::root();
Checkpoint cp(path);
root->loadState(&cp);
// connector.restore(path); // FIXME: not working?!
}
// TODO: Implement reboot