summaryrefslogtreecommitdiff
path: root/src/cpu/thread_state.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/thread_state.hh')
-rw-r--r--src/cpu/thread_state.hh15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cpu/thread_state.hh b/src/cpu/thread_state.hh
index 3a35d444a..5cbc3322b 100644
--- a/src/cpu/thread_state.hh
+++ b/src/cpu/thread_state.hh
@@ -107,6 +107,21 @@ struct ThreadState : public Serializable {
Process *getProcessPtr() { return process; }
+ void setProcessPtr(Process *p)
+ {
+ process = p;
+ /**
+ * When the process pointer changes while operating in SE Mode,
+ * the se translating port proxy needs to be reinitialized since it
+ * holds a pointer to the process class.
+ */
+ if (proxy) {
+ delete proxy;
+ proxy = NULL;
+ initMemProxies(NULL);
+ }
+ }
+
SETranslatingPortProxy &getMemProxy();
/** Reads the number of instructions functionally executed and