summaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-04-18 09:44:45 -0400
committerGabe Black <gblack@eecs.umich.edu>2006-04-18 09:44:45 -0400
commitcae6b571d63b38c3177f5b47891021ba69386453 (patch)
tree6039a7ce3381b6c5448fc127bdb7b063ae52115e /sim
parent0534e355b77497a1272f6078edae1692d87a15cf (diff)
parent609c4ecea618c6406e50432e38882925db7b7ede (diff)
downloadgem5-cae6b571d63b38c3177f5b47891021ba69386453.tar.xz
Merge m5.eecs.umich.edu:/bk/newmem
into ewok.(none):/home/gblack/m5/newmem --HG-- extra : convert_revision : 3eb97976caf57e43119a998c31128ca6f163c05b
Diffstat (limited to 'sim')
-rw-r--r--sim/process.cc6
-rw-r--r--sim/process.hh10
2 files changed, 9 insertions, 7 deletions
diff --git a/sim/process.cc b/sim/process.cc
index ce5833881..d88716f1e 100644
--- a/sim/process.cc
+++ b/sim/process.cc
@@ -240,7 +240,7 @@ DEFINE_SIM_OBJECT_CLASS_NAME("Process", Process)
////////////////////////////////////////////////////////////////////////
-static void
+void
copyStringArray(vector<string> &strings, Addr array_ptr, Addr data_ptr,
TranslatingPort* memPort)
{
@@ -348,12 +348,10 @@ LiveProcess::argsInit(int intSize, int pageSize)
}
void
-LiveProcess::syscall(ExecContext *xc)
+LiveProcess::syscall(int64_t callnum, ExecContext *xc)
{
num_syscalls++;
- int64_t callnum = xc->readIntReg(SyscallNumReg);
-
SyscallDesc *desc = getDesc(callnum);
if (desc == NULL)
fatal("Syscall %d out of range", callnum);
diff --git a/sim/process.hh b/sim/process.hh
index b5b9d18b3..807bf330f 100644
--- a/sim/process.hh
+++ b/sim/process.hh
@@ -50,6 +50,10 @@ class PageTable;
class TranslatingPort;
class System;
+void
+copyStringArray(std::vector<std::string> &strings, Addr array_ptr,
+ Addr data_ptr, TranslatingPort* memPort);
+
class Process : public SimObject
{
public:
@@ -155,7 +159,7 @@ class Process : public SimObject
// look up simulator fd for given target fd
int sim_fd(int tgt_fd);
- virtual void syscall(ExecContext *xc) = 0;
+ virtual void syscall(int64_t callnum, ExecContext *xc) = 0;
};
//
@@ -174,10 +178,10 @@ class LiveProcess : public Process
std::vector<std::string> &argv,
std::vector<std::string> &envp);
- void argsInit(int intSize, int pageSize);
+ virtual void argsInit(int intSize, int pageSize);
public:
- virtual void syscall(ExecContext *xc);
+ virtual void syscall(int64_t callnum, ExecContext *xc);
virtual SyscallDesc* getDesc(int callnum) = 0;
};