process.cc (5154:7e6431213487) | process.cc (5955:d35d2b28df38) |
---|---|
1/* 2 * Copyright (c) 2007 The Hewlett-Packard Development Company 3 * All rights reserved. 4 * 5 * Redistribution and use of this software in source and binary forms, 6 * with or without modification, are permitted provided that the 7 * following conditions are met: 8 * --- 58 unchanged lines hidden (view full) --- 67#include "sim/syscall_emul.hh" 68 69using namespace std; 70using namespace X86ISA; 71 72SyscallDesc* 73X86LinuxProcess::getDesc(int callnum) 74{ | 1/* 2 * Copyright (c) 2007 The Hewlett-Packard Development Company 3 * All rights reserved. 4 * 5 * Redistribution and use of this software in source and binary forms, 6 * with or without modification, are permitted provided that the 7 * following conditions are met: 8 * --- 58 unchanged lines hidden (view full) --- 67#include "sim/syscall_emul.hh" 68 69using namespace std; 70using namespace X86ISA; 71 72SyscallDesc* 73X86LinuxProcess::getDesc(int callnum) 74{ |
75 if (callnum < 0 || callnum > Num_Syscall_Descs) | 75 if (callnum < 0 || callnum >= Num_Syscall_Descs) |
76 return NULL; 77 return &syscallDescs[callnum]; 78} 79 | 76 return NULL; 77 return &syscallDescs[callnum]; 78} 79 |
80X86LinuxProcess::X86LinuxProcess(LiveProcessParams * params, | 80X86_64LinuxProcess::X86_64LinuxProcess(LiveProcessParams * params, |
81 ObjectFile *objFile) | 81 ObjectFile *objFile) |
82 : X86LiveProcess(params, objFile), 83 Num_Syscall_Descs(273) | 82 : X86LinuxProcess(params, objFile, syscallDescs, 273) |
84{} 85 | 83{} 84 |
86void X86LinuxProcess::handleTrap(int trapNum, ThreadContext *tc) 87{ 88 switch(trapNum) 89 { 90 //This implementation is from SPARC 91 case 0x10: //Linux 32 bit syscall trap 92 tc->syscall(tc->readIntReg(1)); 93 break; 94 default: 95 X86LiveProcess::handleTrap(trapNum, tc); 96 } 97} | 85I386LinuxProcess::I386LinuxProcess(LiveProcessParams * params, 86 ObjectFile *objFile) 87 : X86LinuxProcess(params, objFile, syscallDescs, 324) 88{} |