process.hh revision 2458
13520Sgblack@eecs.umich.edu/* 23520Sgblack@eecs.umich.edu * Copyright (c) 2003-2004 The Regents of The University of Michigan 33520Sgblack@eecs.umich.edu * All rights reserved. 43520Sgblack@eecs.umich.edu * 53520Sgblack@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 63520Sgblack@eecs.umich.edu * modification, are permitted provided that the following conditions are 73520Sgblack@eecs.umich.edu * met: redistributions of source code must retain the above copyright 83520Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer; 93520Sgblack@eecs.umich.edu * redistributions in binary form must reproduce the above copyright 103520Sgblack@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 113520Sgblack@eecs.umich.edu * documentation and/or other materials provided with the distribution; 123520Sgblack@eecs.umich.edu * neither the name of the copyright holders nor the names of its 133520Sgblack@eecs.umich.edu * contributors may be used to endorse or promote products derived from 143520Sgblack@eecs.umich.edu * this software without specific prior written permission. 153520Sgblack@eecs.umich.edu * 163520Sgblack@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 173520Sgblack@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 183520Sgblack@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 193520Sgblack@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 203520Sgblack@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 213520Sgblack@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 223520Sgblack@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 233520Sgblack@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 243520Sgblack@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 253520Sgblack@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 263520Sgblack@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 273520Sgblack@eecs.umich.edu */ 283520Sgblack@eecs.umich.edu 293520Sgblack@eecs.umich.edu#ifndef __SPARC_LINUX_PROCESS_HH__ 303520Sgblack@eecs.umich.edu#define __SPARC_LINUX_PROCESS_HH__ 313520Sgblack@eecs.umich.edu 323520Sgblack@eecs.umich.edu#include "sim/process.hh" 333520Sgblack@eecs.umich.edu 343520Sgblack@eecs.umich.edu 353520Sgblack@eecs.umich.edu/// A process with emulated SPARC/Linux syscalls. 363520Sgblack@eecs.umich.educlass SparcLinuxProcess : public LiveProcess 373520Sgblack@eecs.umich.edu{ 383520Sgblack@eecs.umich.edu public: 393520Sgblack@eecs.umich.edu /// Constructor. 403520Sgblack@eecs.umich.edu SparcLinuxProcess(const std::string &name, 413520Sgblack@eecs.umich.edu ObjectFile *objFile, 423520Sgblack@eecs.umich.edu System * system, 433520Sgblack@eecs.umich.edu int stdin_fd, int stdout_fd, int stderr_fd, 443520Sgblack@eecs.umich.edu std::vector<std::string> &argv, 453520Sgblack@eecs.umich.edu std::vector<std::string> &envp); 463520Sgblack@eecs.umich.edu 473520Sgblack@eecs.umich.edu virtual SyscallDesc* getDesc(int callnum); 483520Sgblack@eecs.umich.edu 493520Sgblack@eecs.umich.edu /// The target system's hostname. 503520Sgblack@eecs.umich.edu static const char *hostname; 513520Sgblack@eecs.umich.edu 523633Sktlim@umich.edu /// Array of syscall descriptors, indexed by call number. 533520Sgblack@eecs.umich.edu static SyscallDesc syscallDescs[]; 543520Sgblack@eecs.umich.edu 553520Sgblack@eecs.umich.edu const int Num_Syscall_Descs; 563520Sgblack@eecs.umich.edu}; 573520Sgblack@eecs.umich.edu 583520Sgblack@eecs.umich.edu 593520Sgblack@eecs.umich.edu#endif // __ALPHA_LINUX_PROCESS_HH__ 603520Sgblack@eecs.umich.edu