#include <fcntl.h>
// open(2) flags translation table
-OpenFlagTransTable X86Linux::openFlagTable[] = {
+OpenFlagTransTable X86Linux64::openFlagTable[] = {
#ifdef _MSC_VER
{ TGT_O_RDONLY, _O_RDONLY },
{ TGT_O_WRONLY, _O_WRONLY },
#endif /* _MSC_VER */
};
-const int X86Linux::NUM_OPEN_FLAGS =
- (sizeof(X86Linux::openFlagTable)/sizeof(X86Linux::openFlagTable[0]));
+const int X86Linux64::NUM_OPEN_FLAGS =
+ sizeof(X86Linux64::openFlagTable) /
+ sizeof(X86Linux64::openFlagTable[0]);
SyscallDesc X86LinuxProcess::syscallDescs[] = {
/* 0 */ SyscallDesc("read", unimplementedFunc),
/* 1 */ SyscallDesc("write", unimplementedFunc),
- /* 2 */ SyscallDesc("open", openFunc<X86Linux>),
+ /* 2 */ SyscallDesc("open", openFunc<X86Linux64>),
/* 3 */ SyscallDesc("close", unimplementedFunc),
/* 4 */ SyscallDesc("stat", unimplementedFunc),
/* 5 */ SyscallDesc("fstat", unimplementedFunc),
/* 17 */ SyscallDesc("pread64", unimplementedFunc),
/* 18 */ SyscallDesc("pwrite64", unimplementedFunc),
/* 19 */ SyscallDesc("readv", unimplementedFunc),
- /* 20 */ SyscallDesc("writev", unimplementedFunc),
+ /* 20 */ SyscallDesc("writev", writevFunc<X86Linux64>),
/* 21 */ SyscallDesc("access", unimplementedFunc),
/* 22 */ SyscallDesc("pipe", unimplementedFunc),
/* 23 */ SyscallDesc("select", unimplementedFunc),
/* 99 */ SyscallDesc("sysinfo", unimplementedFunc),
/* 100 */ SyscallDesc("times", unimplementedFunc),
/* 101 */ SyscallDesc("ptrace", unimplementedFunc),
- /* 102 */ SyscallDesc("getuid", unimplementedFunc),
+ /* 102 */ SyscallDesc("getuid", getuidFunc),
/* 103 */ SyscallDesc("syslog", unimplementedFunc),
- /* 104 */ SyscallDesc("getgid", unimplementedFunc),
+ /* 104 */ SyscallDesc("getgid", getgidFunc),
/* 105 */ SyscallDesc("setuid", unimplementedFunc),
/* 106 */ SyscallDesc("setgid", unimplementedFunc),
- /* 107 */ SyscallDesc("geteuid", unimplementedFunc),
- /* 108 */ SyscallDesc("getegid", unimplementedFunc),
+ /* 107 */ SyscallDesc("geteuid", geteuidFunc),
+ /* 108 */ SyscallDesc("getegid", getegidFunc),
/* 109 */ SyscallDesc("setpgid", unimplementedFunc),
/* 110 */ SyscallDesc("getppid", unimplementedFunc),
/* 111 */ SyscallDesc("getpgrp", unimplementedFunc),