sim, x86: Make clone a virtual function
authorSean Wilson <spwilson2@wisc.edu>
Wed, 28 Jun 2017 19:21:29 +0000 (14:21 -0500)
committerSean Wilson <spwilson2@wisc.edu>
Mon, 17 Jul 2017 15:16:32 +0000 (15:16 +0000)
This fixes the function call to clone in syscall_emul.hh where
the x86 version should be called before the base implementation
of clone.

Change-Id: Iccd2f680ff6e3a5536037d688a80ab3f236bbd98
Signed-off-by: Sean Wilson <spwilson2@wisc.edu>
Reviewed-on: https://gem5-review.googlesource.com/3902
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

src/arch/x86/process.hh
src/sim/process.hh

index 9cd5378eb019c2b496c78982d77757ed5759c321..3eb9620c9d33a24532235745cea126fc0c1eae97 100644 (file)
@@ -84,7 +84,7 @@ namespace X86ISA
         void setSyscallReturn(ThreadContext *tc,
                               SyscallReturn return_value) override;
         void clone(ThreadContext *old_tc, ThreadContext *new_tc,
-                   Process *process, TheISA::IntReg flags);
+                   Process *process, TheISA::IntReg flags) override;
 
         X86Process &
         operator=(const X86Process &in)
@@ -140,7 +140,7 @@ namespace X86ISA
         void setSyscallArg(ThreadContext *tc, int i,
                            X86ISA::IntReg val) override;
         void clone(ThreadContext *old_tc, ThreadContext *new_tc,
-                   Process *process, TheISA::IntReg flags);
+                   Process *process, TheISA::IntReg flags) override;
     };
 
     class I386Process : public X86Process
@@ -186,7 +186,7 @@ namespace X86ISA
         void setSyscallArg(ThreadContext *tc, int i,
                            X86ISA::IntReg val) override;
         void clone(ThreadContext *old_tc, ThreadContext *new_tc,
-                   Process *process, TheISA::IntReg flags);
+                   Process *process, TheISA::IntReg flags) override;
     };
 
     /**
index 5da30a4c3ad23b00470f49ae7731d6d21e90ae84..e4a52e3de48ba1a7c7073a62f3468fe3c67242c1 100644 (file)
@@ -161,8 +161,8 @@ class Process : public SimObject
     void replicatePage(Addr vaddr, Addr new_paddr, ThreadContext *old_tc,
                        ThreadContext *new_tc, bool alloc_page);
 
-    void clone(ThreadContext *old_tc, ThreadContext *new_tc, Process *new_p,
-               TheISA::IntReg flags);
+    virtual void clone(ThreadContext *old_tc, ThreadContext *new_tc,
+                       Process *new_p, TheISA::IntReg flags);
 
     // thread contexts associated with this process
     std::vector<ContextID> contextIds;