summaryrefslogtreecommitdiff
path: root/src/arch/alpha
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/alpha
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/alpha')
-rw-r--r--src/arch/alpha/linux/process.cc20
-rw-r--r--src/arch/alpha/linux/process.hh11
-rw-r--r--src/arch/alpha/process.cc11
-rw-r--r--src/arch/alpha/process.hh9
-rw-r--r--src/arch/alpha/tru64/process.cc17
-rw-r--r--src/arch/alpha/tru64/process.hh12
6 files changed, 13 insertions, 67 deletions
diff --git a/src/arch/alpha/linux/process.cc b/src/arch/alpha/linux/process.cc
index b638aa927..ec47992bd 100644
--- a/src/arch/alpha/linux/process.cc
+++ b/src/arch/alpha/linux/process.cc
@@ -568,23 +568,9 @@ SyscallDesc AlphaLinuxProcess::syscallDescs[] = {
/* 441 */ SyscallDesc("keyctl", unimplementedFunc)
};
-AlphaLinuxProcess::AlphaLinuxProcess(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)
- : AlphaLiveProcess(name, objFile, system, stdin_fd, stdout_fd,
- stderr_fd, argv, envp, cwd, _uid, _euid, _gid, _egid, _pid, _ppid),
+AlphaLinuxProcess::AlphaLinuxProcess(LiveProcessParams * params,
+ ObjectFile *objFile)
+ : AlphaLiveProcess(params, objFile),
Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc))
{
//init_regs->intRegFile[0] = 0;
diff --git a/src/arch/alpha/linux/process.hh b/src/arch/alpha/linux/process.hh
index cb22f521b..8d7c24e37 100644
--- a/src/arch/alpha/linux/process.hh
+++ b/src/arch/alpha/linux/process.hh
@@ -40,16 +40,7 @@ class AlphaLinuxProcess : public AlphaLiveProcess
{
public:
/// Constructor.
- AlphaLinuxProcess(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);
+ AlphaLinuxProcess(LiveProcessParams * params, ObjectFile *objFile);
virtual SyscallDesc* getDesc(int callnum);
diff --git a/src/arch/alpha/process.cc b/src/arch/alpha/process.cc
index a9848ebb5..ef53021c5 100644
--- a/src/arch/alpha/process.cc
+++ b/src/arch/alpha/process.cc
@@ -40,14 +40,9 @@
using namespace AlphaISA;
using namespace std;
-AlphaLiveProcess::AlphaLiveProcess(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)
+AlphaLiveProcess::AlphaLiveProcess(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/alpha/process.hh b/src/arch/alpha/process.hh
index 8eede502a..c66b97d23 100644
--- a/src/arch/alpha/process.hh
+++ b/src/arch/alpha/process.hh
@@ -43,14 +43,7 @@ class System;
class AlphaLiveProcess : public LiveProcess
{
protected:
- AlphaLiveProcess(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);
+ AlphaLiveProcess(LiveProcessParams * params, ObjectFile *objFile);
void startup();
};
diff --git a/src/arch/alpha/tru64/process.cc b/src/arch/alpha/tru64/process.cc
index a1f02b16c..6823d820a 100644
--- a/src/arch/alpha/tru64/process.cc
+++ b/src/arch/alpha/tru64/process.cc
@@ -573,20 +573,9 @@ AlphaTru64Process::getDesc(int callnum)
}
-AlphaTru64Process::AlphaTru64Process(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)
- : AlphaLiveProcess(name, objFile, system, stdin_fd, stdout_fd,
- stderr_fd, argv, envp, cwd, _uid, _euid, _gid, _egid, _pid, _ppid),
+AlphaTru64Process::AlphaTru64Process(LiveProcessParams * params,
+ ObjectFile *objFile)
+ : AlphaLiveProcess(params, objFile),
Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc)),
Num_Mach_Syscall_Descs(sizeof(machSyscallDescs) / sizeof(SyscallDesc))
{
diff --git a/src/arch/alpha/tru64/process.hh b/src/arch/alpha/tru64/process.hh
index f5643c0b9..16bc499c6 100644
--- a/src/arch/alpha/tru64/process.hh
+++ b/src/arch/alpha/tru64/process.hh
@@ -39,16 +39,8 @@ class AlphaTru64Process : public AlphaLiveProcess
{
public:
/// Constructor.
- AlphaTru64Process(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);
+ AlphaTru64Process(LiveProcessParams * params,
+ ObjectFile *objFile);
/// Array of syscall descriptors, indexed by call number.
static SyscallDesc syscallDescs[];