Encapsulated gem5-specific code into wrapper functions to separate the build process (Fail: CMake, gem5: scons). Added some gem5-related FIXMEs. Another CMake related FIXME added. +some cosmetics. Change-Id: Id84b480127b1f13aed6a0ee97f3583f410d531c5
29 lines
515 B
C++
29 lines
515 B
C++
#if 0
|
|
#include "Gem5Connector.hpp"
|
|
|
|
#include "base/trace.hh"
|
|
#include "debug/FailState.hh"
|
|
#include "sim/root.hh"
|
|
|
|
Gem5Connector connector;
|
|
|
|
void Gem5Connector::save(const std::string &path)
|
|
{
|
|
DPRINTF(FailState, "Saving state to %s.\n", path);
|
|
|
|
Root* root = Root::root();
|
|
root->Serializable::serializeAll(path);
|
|
}
|
|
|
|
void Gem5Connector::restore(const std::string &path)
|
|
{
|
|
DPRINTF(FailState, "Restoring state from %s.\n", path);
|
|
|
|
Root* root = Root::root();
|
|
Checkpoint cp(path);
|
|
|
|
root->loadState(&cp);
|
|
}
|
|
|
|
#endif
|