summaryrefslogtreecommitdiff
path: root/src/arch/x86
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-10-16 18:04:01 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-10-16 18:04:01 -0700
commit54466a31c3c295f11d5936d34a1b2ac0d3e0045f (patch)
tree9214dd0f304c8376ff6c81b080589f994916d439 /src/arch/x86
parent9660a0a5524a65094a43b557edf6a6cf0d11222d (diff)
downloadgem5-54466a31c3c295f11d5936d34a1b2ac0d3e0045f.tar.xz
Make the process objects use the Params structs in their constructors, and use a limit to check if access are on the stack.
--HG-- extra : convert_revision : af40a7acf424c4c4f62d0d76db1001a714ae0474
Diffstat (limited to 'src/arch/x86')
-rw-r--r--src/arch/x86/linux/process.cc18
-rw-r--r--src/arch/x86/linux/process.hh11
-rw-r--r--src/arch/x86/process.cc11
-rw-r--r--src/arch/x86/process.hh10
4 files changed, 8 insertions, 42 deletions
diff --git a/src/arch/x86/linux/process.cc b/src/arch/x86/linux/process.cc
index 9ef591a1c..8beaf150b 100644
--- a/src/arch/x86/linux/process.cc
+++ b/src/arch/x86/linux/process.cc
@@ -77,21 +77,9 @@ X86LinuxProcess::getDesc(int callnum)
return &syscallDescs[callnum];
}
-X86LinuxProcess::X86LinuxProcess(const std::string &name,
- ObjectFile *objFile,
- System * system,
- int stdin_fd,
- int stdout_fd,
- int stderr_fd,
- std::vector<std::string> &argv,
- std::vector<std::string> &envp,
- const std::string &cwd,
- uint64_t _uid, uint64_t _euid,
- uint64_t _gid, uint64_t _egid,
- uint64_t _pid, uint64_t _ppid)
- : X86LiveProcess(name, objFile, system,
- stdin_fd, stdout_fd, stderr_fd, argv, envp, cwd,
- _uid, _euid, _gid, _egid, _pid, _ppid),
+X86LinuxProcess::X86LinuxProcess(LiveProcessParams * params,
+ ObjectFile *objFile)
+ : X86LiveProcess(params, objFile),
Num_Syscall_Descs(273)
{}
diff --git a/src/arch/x86/linux/process.hh b/src/arch/x86/linux/process.hh
index 7e7236f0d..e224374d4 100644
--- a/src/arch/x86/linux/process.hh
+++ b/src/arch/x86/linux/process.hh
@@ -70,16 +70,7 @@ class X86LinuxProcess : public X86LiveProcess
{
public:
/// Constructor.
- X86LinuxProcess(const std::string &name,
- ObjectFile *objFile,
- System * system,
- int stdin_fd, int stdout_fd, int stderr_fd,
- std::vector<std::string> &argv,
- std::vector<std::string> &envp,
- const std::string &cwd,
- uint64_t _uid, uint64_t _euid,
- uint64_t _gid, uint64_t _egid,
- uint64_t _pid, uint64_t _ppid);
+ X86LinuxProcess(LiveProcessParams * params, ObjectFile *objFile);
/// Array of syscall descriptors, indexed by call number.
static SyscallDesc syscallDescs[];
diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc
index 0193344e8..db32437d5 100644
--- a/src/arch/x86/process.cc
+++ b/src/arch/x86/process.cc
@@ -109,14 +109,9 @@ M5_64_auxv_t::M5_64_auxv_t(int64_t type, int64_t val)
a_val = TheISA::htog(val);
}
-X86LiveProcess::X86LiveProcess(const std::string &nm, ObjectFile *objFile,
- System *_system, int stdin_fd, int stdout_fd, int stderr_fd,
- std::vector<std::string> &argv, std::vector<std::string> &envp,
- const std::string &cwd,
- uint64_t _uid, uint64_t _euid, uint64_t _gid, uint64_t _egid,
- uint64_t _pid, uint64_t _ppid)
- : LiveProcess(nm, objFile, _system, stdin_fd, stdout_fd, stderr_fd,
- argv, envp, cwd, _uid, _euid, _gid, _egid, _pid, _ppid)
+X86LiveProcess::X86LiveProcess(LiveProcessParams * params,
+ ObjectFile *objFile)
+ : LiveProcess(params, objFile)
{
brk_point = objFile->dataBase() + objFile->dataSize() + objFile->bssSize();
brk_point = roundUp(brk_point, VMPageSize);
diff --git a/src/arch/x86/process.hh b/src/arch/x86/process.hh
index a2fa258c8..5def9e13d 100644
--- a/src/arch/x86/process.hh
+++ b/src/arch/x86/process.hh
@@ -84,15 +84,7 @@ namespace X86ISA
protected:
std::vector<M5_64_auxv_t> auxv;
- X86LiveProcess(const std::string &nm, ObjectFile *objFile,
- System *_system,
- int stdin_fd, int stdout_fd, int stderr_fd,
- std::vector<std::string> &argv,
- std::vector<std::string> &envp,
- const std::string &cwd,
- uint64_t _uid, uint64_t _euid,
- uint64_t _gid, uint64_t _egid,
- uint64_t _pid, uint64_t _ppid);
+ X86LiveProcess(LiveProcessParams * params, ObjectFile *objFile);
void startup();