+ enum AuxiliaryVectorType {
+ M5_AT_NULL = 0,
+ M5_AT_IGNORE = 1,
+ M5_AT_EXECFD = 2,
+ M5_AT_PHDR = 3,
+ M5_AT_PHENT = 4,
+ M5_AT_PHNUM = 5,
+ M5_AT_PAGESZ = 6,
+ M5_AT_BASE = 7,
+ M5_AT_FLAGS = 8,
+ M5_AT_ENTRY = 9,
+ M5_AT_NOTELF = 10,
+ M5_AT_UID = 11,
+ M5_AT_EUID = 12,
+ M5_AT_GID = 13,
+ M5_AT_EGID = 14,
+ // The following may be specific to Linux
+ M5_AT_PLATFORM = 15,
+ M5_AT_HWCAP = 16,
+ M5_AT_CLKTCK = 17,
+
+ M5_AT_SECURE = 23,
+ M5_BASE_PLATFORM = 24,
+ M5_AT_RANDOM = 25,
+
+ M5_AT_EXECFN = 31,
+
+ M5_AT_VECTOR_SIZE = 44
+ };
+
+ inline uint64_t uid() {return __uid;}
+ inline uint64_t euid() {return __euid;}
+ inline uint64_t gid() {return __gid;}
+ inline uint64_t egid() {return __egid;}
+ inline uint64_t pid() {return __pid;}
+ inline uint64_t ppid() {return __ppid;}
+
+ std::string
+ fullPath(const std::string &filename)
+ {
+ if (filename[0] == '/' || cwd.empty())
+ return filename;
+
+ std::string full = cwd;
+
+ if (cwd[cwd.size() - 1] != '/')
+ full += '/';
+
+ return full + filename;
+ }
+
+ std::string getcwd() const { return cwd; }
+
+ virtual void syscall(int64_t callnum, ThreadContext *tc);
+
+ virtual TheISA::IntReg getSyscallArg(ThreadContext *tc, int &i) = 0;
+ virtual TheISA::IntReg getSyscallArg(ThreadContext *tc, int &i, int width);
+ virtual void setSyscallArg(ThreadContext *tc,
+ int i, TheISA::IntReg val) = 0;
+ virtual void setSyscallReturn(ThreadContext *tc,
+ SyscallReturn return_value) = 0;
+
+ 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(LiveProcessParams *params);