diff options
Diffstat (limited to 'sim')
-rw-r--r-- | sim/process.cc | 6 | ||||
-rw-r--r-- | sim/process.hh | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/sim/process.cc b/sim/process.cc index 4e4a54572..1f2e8d0fd 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; }; |