summaryrefslogtreecommitdiff
path: root/src/sim/process.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/process.cc')
-rw-r--r--src/sim/process.cc34
1 files changed, 14 insertions, 20 deletions
diff --git a/src/sim/process.cc b/src/sim/process.cc
index bcb9b582f..50ebc9cec 100644
--- a/src/sim/process.cc
+++ b/src/sim/process.cc
@@ -93,17 +93,6 @@ using namespace TheISA;
// current number of allocated processes
int num_processes = 0;
-template<class IntType>
-
-AuxVector<IntType>::AuxVector(IntType type, IntType val)
-{
- a_type = TheISA::htog(type);
- a_val = TheISA::htog(val);
-}
-
-template struct AuxVector<uint32_t>;
-template struct AuxVector<uint64_t>;
-
static int
openFile(const string& filename, int flags, mode_t mode)
{
@@ -205,7 +194,6 @@ Process::Process(ProcessParams * params, ObjectFile * obj_file)
}
}
-
void
Process::regStats()
{
@@ -497,7 +485,6 @@ Process::unserialize(CheckpointIn &cp)
// found.
}
-
bool
Process::map(Addr vaddr, Addr paddr, int size, bool cacheable)
{
@@ -506,7 +493,6 @@ Process::map(Addr vaddr, Addr paddr, int size, bool cacheable)
return true;
}
-
void
Process::syscall(int64_t callnum, ThreadContext *tc)
{
@@ -525,7 +511,6 @@ Process::getSyscallArg(ThreadContext *tc, int &i, int width)
return getSyscallArg(tc, i);
}
-
EmulatedDriver *
Process::findDriver(std::string filename)
{
@@ -561,14 +546,12 @@ Process::updateBias()
interp->updateBias(ld_bias);
}
-
ObjectFile *
Process::getInterpreter()
{
return objFile->getInterpreter();
}
-
Addr
Process::getBias()
{
@@ -577,7 +560,6 @@ Process::getBias()
return interp ? interp->bias() : objFile->bias();
}
-
Addr
Process::getStartPC()
{
@@ -586,7 +568,6 @@ Process::getStartPC()
return interp ? interp->entryPoint() : objFile->entryPoint();
}
-
Process *
ProcessParams::create()
{
@@ -634,7 +615,6 @@ ProcessParams::create()
}
break;
-
case ObjectFile::Solaris:
process = new SparcSolarisProcess(this, obj_file);
break;
@@ -743,3 +723,17 @@ ProcessParams::create()
fatal("Unknown error creating process object.");
return process;
}
+
+std::string
+Process::fullPath(const std::string &file_name)
+{
+ if (file_name[0] == '/' || cwd.empty())
+ return file_name;
+
+ std::string full = cwd;
+
+ if (cwd[cwd.size() - 1] != '/')
+ full += '/';
+
+ return full + file_name;
+}