From e0140202bd5f0d16d25e526283047e5a2ef5dc0c Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Sun, 11 Jun 2006 21:49:46 -0400 Subject: Move LiveProcess::create() from arch-specific files bcak to main LiveProcess, then automatically select ISA based on object file type. Now simulation scripts no longer need to care about the ISA, as they can just call LiveProcess(). configs/test/test.py: Script no longer cares about ISA. src/arch/alpha/process.cc: src/arch/alpha/process.hh: src/arch/mips/process.cc: src/arch/mips/process.hh: src/arch/sparc/process.cc: src/arch/sparc/process.hh: src/sim/process.cc: src/sim/process.hh: Move create() from arch-specific files back to main LiveProcess, then automatically select ISA based on object file type. --HG-- extra : convert_revision : ef33ffdc79623b77000f5d68edd2026760b76ab6 --- src/sim/process.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/sim/process.hh') diff --git a/src/sim/process.hh b/src/sim/process.hh index edbc1e492..763deb100 100644 --- a/src/sim/process.hh +++ b/src/sim/process.hh @@ -186,6 +186,16 @@ class LiveProcess : public Process virtual void syscall(int64_t callnum, ThreadContext *tc); virtual SyscallDesc* getDesc(int callnum) = 0; + + // 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 &argv, + std::vector &envp); }; -- cgit v1.2.3