diff options
author | Gabe Black <gabeblack@google.com> | 2017-05-24 02:49:51 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2017-05-25 21:50:03 +0000 |
commit | 91228e9b222513ffc8008558fd4b3f468cccdbbe (patch) | |
tree | 65313e11701cf649af9352ffbaef169fd52b869e /src/sim/process.hh | |
parent | af7641a3e9d65ab11247c2182f38923186e0581b (diff) | |
download | gem5-91228e9b222513ffc8008558fd4b3f468cccdbbe.tar.xz |
x86: sim: Make 32 bit x86 processes work again.
When the LiveProcess class was renamed to be just Process, the CL author
also changed the syscall function from a virtual function into a regular
one. Unfortunately, the I386Process class overrode the syscall function
to adjust the return address so that control would return to the right
place. Without that adjustment, 32 bit x86 process would segfault and die
immediately after their first system call.
This change reinstates the virtual specifier on the base syscall function,
and adds an override keyword on the I386Process's version so that it won't
be orphaned again in the future. It also fixes some small style issues the
style checker script complained about.
Change-Id: I0d1178ea0eda6676050c8fc043820a2bb4d99c0d
Reviewed-on: https://gem5-review.googlesource.com/3500
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/sim/process.hh')
-rw-r--r-- | src/sim/process.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sim/process.hh b/src/sim/process.hh index add3eb357..5da30a4c3 100644 --- a/src/sim/process.hh +++ b/src/sim/process.hh @@ -71,7 +71,7 @@ class Process : public SimObject void initState() override; DrainState drain() override; - void syscall(int64_t callnum, ThreadContext *tc, Fault *fault); + virtual void syscall(int64_t callnum, ThreadContext *tc, Fault *fault); virtual TheISA::IntReg getSyscallArg(ThreadContext *tc, int &i) = 0; virtual TheISA::IntReg getSyscallArg(ThreadContext *tc, int &i, int width); virtual void setSyscallArg(ThreadContext *tc, int i, |