1 /* 2 * Copyright 2013, Rene Gollent, rene@gollent.com. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #include "SyscallInfo.h" 7 8 #include <string.h> 9 10 11 SyscallInfo::SyscallInfo() 12 : 13 fStartTime(0), 14 fEndTime(0), 15 fReturnValue(0), 16 fSyscall(0) 17 { 18 memset(fArguments, 0, sizeof(fArguments)); 19 } 20 21 22 SyscallInfo::SyscallInfo(const SyscallInfo& other) 23 : 24 fStartTime(other.fStartTime), 25 fEndTime(other.fEndTime), 26 fReturnValue(other.fReturnValue), 27 fSyscall(other.fSyscall) 28 { 29 memcpy(fArguments, other.fArguments, sizeof(fArguments)); 30 } 31 32 33 SyscallInfo::SyscallInfo(bigtime_t startTime, bigtime_t endTime, 34 uint64 returnValue, uint32 syscall, const uint8* args) 35 : 36 fStartTime(startTime), 37 fEndTime(endTime), 38 fReturnValue(returnValue), 39 fSyscall(syscall) 40 { 41 memcpy(fArguments, args, sizeof(fArguments)); 42 } 43 44 45 void 46 SyscallInfo::SetTo(bigtime_t startTime, bigtime_t endTime, uint64 returnValue, 47 uint32 syscall, const uint8* args) 48 { 49 fStartTime = startTime; 50 fEndTime = endTime; 51 fReturnValue = returnValue; 52 fSyscall = syscall; 53 memcpy(fArguments, args, sizeof(fArguments)); 54 } 55