summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/system.cc2
-rw-r--r--src/sim/system.hh20
2 files changed, 22 insertions, 0 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 4871ac824..65eb0e3eb 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -341,6 +341,7 @@ System::serialize(ostream &os)
kernelSymtab->serialize("kernel_symtab", os);
SERIALIZE_SCALAR(pagePtr);
SERIALIZE_SCALAR(nextPID);
+ serializeSymtab(os);
}
@@ -351,6 +352,7 @@ System::unserialize(Checkpoint *cp, const string &section)
kernelSymtab->unserialize("kernel_symtab", cp, section);
UNSERIALIZE_SCALAR(pagePtr);
UNSERIALIZE_SCALAR(nextPID);
+ unserializeSymtab(cp, section);
}
void
diff --git a/src/sim/system.hh b/src/sim/system.hh
index 4348ecaca..2393c83f2 100644
--- a/src/sim/system.hh
+++ b/src/sim/system.hh
@@ -403,6 +403,26 @@ class System : public MemObject
// For futex system call
std::map<uint64_t, std::list<ThreadContext *> * > futexMap;
+ protected:
+
+ /**
+ * If needed, serialize additional symbol table entries for a
+ * specific subclass of this sytem. Currently this is used by
+ * Alpha and MIPS.
+ *
+ * @param os stream to serialize to
+ */
+ virtual void serializeSymtab(std::ostream &os) {}
+
+ /**
+ * If needed, unserialize additional symbol table entries for a
+ * specific subclass of this system.
+ *
+ * @param cp checkpoint to unserialize from
+ * @param section relevant section in the checkpoint
+ */
+ virtual void unserializeSymtab(Checkpoint *cp,
+ const std::string &section) {}
};