summaryrefslogtreecommitdiff
path: root/src/sim/process.hh
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/sim/process.hh
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/sim/process.hh')
-rw-r--r--src/sim/process.hh39
1 files changed, 12 insertions, 27 deletions
diff --git a/src/sim/process.hh b/src/sim/process.hh
index 83c00a676..d43208c27 100644
--- a/src/sim/process.hh
+++ b/src/sim/process.hh
@@ -48,12 +48,14 @@
#include "sim/host.hh"
#include "sim/sim_object.hh"
-class ThreadContext;
-class SyscallDesc;
+class GDBListener;
class PageTable;
-class TranslatingPort;
+class ProcessParams;
+class LiveProcessParams;
+class SyscallDesc;
class System;
-class GDBListener;
+class ThreadContext;
+class TranslatingPort;
namespace TheISA
{
class RemoteGDB;
@@ -103,6 +105,9 @@ class Process : public SimObject
unsigned stack_size; // initial stack size
Addr stack_min; // lowest address accessed on the stack
+ // The maximum size allowed for the stack.
+ Addr max_stack_size;
+
// addr to use for next stack region (for multithreaded apps)
Addr next_thread_stack_base;
@@ -121,11 +126,7 @@ class Process : public SimObject
protected:
// constructor
- Process(const std::string &nm,
- System *_system,
- int stdin_fd, // initial I/O descriptors
- int stdout_fd,
- int stderr_fd);
+ Process(ProcessParams * params);
// post initialization startup
virtual void startup();
@@ -195,14 +196,7 @@ class LiveProcess : public Process
std::vector<std::string> envp;
std::string cwd;
- LiveProcess(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(LiveProcessParams * params, ObjectFile *objFile);
virtual void argsInit(int intSize, int pageSize);
@@ -272,16 +266,7 @@ class LiveProcess : public Process
// this function is used to create the LiveProcess object, since
// we can't tell which subclass of LiveProcess to use until we
// open and look at the object file.
- static LiveProcess *create(const std::string &nm,
- System *_system,
- int stdin_fd, int stdout_fd, int stderr_fd,
- std::string executable,
- 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);
+ static LiveProcess *create(LiveProcessParams * params);
};