process.cc revision 11392:5967db4cff04
1/* 2 * Copyright (c) 2014 Advanced Micro Devices, Inc. 3 * Copyright (c) 2012 ARM Limited 4 * All rights reserved 5 * 6 * The license below extends only to copyright in the software and shall 7 * not be construed as granting a license to any other intellectual 8 * property including but not limited to intellectual property relating 9 * to a hardware implementation of the functionality of the software 10 * licensed hereunder. You may use the software subject to the license 11 * terms below provided that you ensure that this notice is replicated 12 * unmodified and in its entirety in all distributions of the software, 13 * modified or unmodified, in source code or in binary form. 14 * 15 * Copyright (c) 2001-2005 The Regents of The University of Michigan 16 * All rights reserved. 17 * 18 * Redistribution and use in source and binary forms, with or without 19 * modification, are permitted provided that the following conditions are 20 * met: redistributions of source code must retain the above copyright 21 * notice, this list of conditions and the following disclaimer; 22 * redistributions in binary form must reproduce the above copyright 23 * notice, this list of conditions and the following disclaimer in the 24 * documentation and/or other materials provided with the distribution; 25 * neither the name of the copyright holders nor the names of its 26 * contributors may be used to endorse or promote products derived from 27 * this software without specific prior written permission. 28 * 29 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 30 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 31 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 32 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 33 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 34 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 35 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 36 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 39 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 40 * 41 * Authors: Nathan Binkert 42 * Steve Reinhardt 43 * Ali Saidi 44 */ 45 46#include <fcntl.h> 47#include <unistd.h> 48 49#include <cstdio> 50#include <map> 51#include <string> 52 53#include "base/loader/object_file.hh" 54#include "base/loader/symtab.hh" 55#include "base/intmath.hh" 56#include "base/statistics.hh" 57#include "config/the_isa.hh" 58#include "cpu/thread_context.hh" 59#include "mem/page_table.hh" 60#include "mem/multi_level_page_table.hh" 61#include "mem/se_translating_port_proxy.hh" 62#include "params/LiveProcess.hh" 63#include "params/Process.hh" 64#include "sim/debug.hh" 65#include "sim/process.hh" 66#include "sim/process_impl.hh" 67#include "sim/stats.hh" 68#include "sim/syscall_emul.hh" 69#include "sim/system.hh" 70 71#if THE_ISA == ALPHA_ISA 72#include "arch/alpha/linux/process.hh" 73#include "arch/alpha/tru64/process.hh" 74#elif THE_ISA == SPARC_ISA 75#include "arch/sparc/linux/process.hh" 76#include "arch/sparc/solaris/process.hh" 77#elif THE_ISA == MIPS_ISA 78#include "arch/mips/linux/process.hh" 79#elif THE_ISA == ARM_ISA 80#include "arch/arm/linux/process.hh" 81#include "arch/arm/freebsd/process.hh" 82#elif THE_ISA == X86_ISA 83#include "arch/x86/linux/process.hh" 84#elif THE_ISA == POWER_ISA 85#include "arch/power/linux/process.hh" 86#else 87#error "THE_ISA not set" 88#endif 89 90 91using namespace std; 92using namespace TheISA; 93 94// current number of allocated processes 95int num_processes = 0; 96 97template<class IntType> 98 99AuxVector<IntType>::AuxVector(IntType type, IntType val) 100{ 101 a_type = TheISA::htog(type); 102 a_val = TheISA::htog(val); 103} 104 105template struct AuxVector<uint32_t>; 106template struct AuxVector<uint64_t>; 107 108static int 109openFile(const string& filename, int flags, mode_t mode) 110{ 111 int sim_fd = open(filename.c_str(), flags, mode); 112 if (sim_fd != -1) 113 return sim_fd; 114 fatal("Unable to open %s with mode %O", filename, mode); 115} 116 117static int 118openInputFile(const string &filename) 119{ 120 return openFile(filename, O_RDONLY, 0); 121} 122 123static int 124openOutputFile(const string &filename) 125{ 126 return openFile(filename, O_WRONLY | O_CREAT | O_TRUNC, 0664); 127} 128 129Process::Process(ProcessParams * params) 130 : SimObject(params), system(params->system), 131 brk_point(0), stack_base(0), stack_size(0), stack_min(0), 132 max_stack_size(params->max_stack_size), 133 next_thread_stack_base(0), 134 M5_pid(system->allocatePID()), 135 useArchPT(params->useArchPT), 136 kvmInSE(params->kvmInSE), 137 pTable(useArchPT ? 138 static_cast<PageTableBase *>(new ArchPageTable(name(), M5_pid, system)) : 139 static_cast<PageTableBase *>(new FuncPageTable(name(), M5_pid)) ), 140 initVirtMem(system->getSystemPort(), this, 141 SETranslatingPortProxy::Always), 142 fd_array(make_shared<array<FDEntry, NUM_FDS>>()), 143 imap {{"", -1}, 144 {"cin", STDIN_FILENO}, 145 {"stdin", STDIN_FILENO}}, 146 oemap{{"", -1}, 147 {"cout", STDOUT_FILENO}, 148 {"stdout", STDOUT_FILENO}, 149 {"cerr", STDERR_FILENO}, 150 {"stderr", STDERR_FILENO}} 151{ 152 int sim_fd; 153 std::map<string,int>::iterator it; 154 155 // Search through the input options and set fd if match is found; 156 // otherwise, open an input file and seek to location. 157 FDEntry *fde_stdin = getFDEntry(STDIN_FILENO); 158 if ((it = imap.find(params->input)) != imap.end()) 159 sim_fd = it->second; 160 else 161 sim_fd = openInputFile(params->input); 162 fde_stdin->set(sim_fd, params->input, O_RDONLY, -1, false); 163 164 // Search through the output/error options and set fd if match is found; 165 // otherwise, open an output file and seek to location. 166 FDEntry *fde_stdout = getFDEntry(STDOUT_FILENO); 167 if ((it = oemap.find(params->output)) != oemap.end()) 168 sim_fd = it->second; 169 else 170 sim_fd = openOutputFile(params->output); 171 fde_stdout->set(sim_fd, params->output, O_WRONLY | O_CREAT | O_TRUNC, 172 0664, false); 173 174 FDEntry *fde_stderr = getFDEntry(STDERR_FILENO); 175 if (params->output == params->errout) 176 // Reuse the same file descriptor if these match. 177 sim_fd = fde_stdout->fd; 178 else if ((it = oemap.find(params->errout)) != oemap.end()) 179 sim_fd = it->second; 180 else 181 sim_fd = openOutputFile(params->errout); 182 fde_stderr->set(sim_fd, params->errout, O_WRONLY | O_CREAT | O_TRUNC, 183 0664, false); 184 185 mmap_end = 0; 186 nxm_start = nxm_end = 0; 187 // other parameters will be initialized when the program is loaded 188} 189 190 191void 192Process::regStats() 193{ 194 using namespace Stats; 195 196 num_syscalls 197 .name(name() + ".num_syscalls") 198 .desc("Number of system calls") 199 ; 200} 201 202void 203Process::inheritFDArray(Process *p) 204{ 205 fd_array = p->fd_array; 206} 207 208ThreadContext * 209Process::findFreeContext() 210{ 211 for (int id : contextIds) { 212 ThreadContext *tc = system->getThreadContext(id); 213 if (tc->status() == ThreadContext::Halted) 214 return tc; 215 } 216 return NULL; 217} 218 219void 220Process::initState() 221{ 222 if (contextIds.empty()) 223 fatal("Process %s is not associated with any HW contexts!\n", name()); 224 225 // first thread context for this process... initialize & enable 226 ThreadContext *tc = system->getThreadContext(contextIds[0]); 227 228 // mark this context as active so it will start ticking. 229 tc->activate(); 230 231 pTable->initState(tc); 232} 233 234DrainState 235Process::drain() 236{ 237 findFileOffsets(); 238 return DrainState::Drained; 239} 240 241int 242Process::allocFD(int sim_fd, const string& filename, int flags, int mode, 243 bool pipe) 244{ 245 for (int free_fd = 0; free_fd < fd_array->size(); free_fd++) { 246 FDEntry *fde = getFDEntry(free_fd); 247 if (fde->isFree()) { 248 fde->set(sim_fd, filename, flags, mode, pipe); 249 return free_fd; 250 } 251 } 252 253 fatal("Out of target file descriptors"); 254} 255 256void 257Process::resetFDEntry(int tgt_fd) 258{ 259 FDEntry *fde = getFDEntry(tgt_fd); 260 assert(fde->fd > -1); 261 262 fde->reset(); 263} 264 265int 266Process::getSimFD(int tgt_fd) 267{ 268 FDEntry *entry = getFDEntry(tgt_fd); 269 return entry ? entry->fd : -1; 270} 271 272FDEntry * 273Process::getFDEntry(int tgt_fd) 274{ 275 assert(0 <= tgt_fd && tgt_fd < fd_array->size()); 276 return &(*fd_array)[tgt_fd]; 277} 278 279int 280Process::getTgtFD(int sim_fd) 281{ 282 for (int index = 0; index < fd_array->size(); index++) 283 if ((*fd_array)[index].fd == sim_fd) 284 return index; 285 return -1; 286} 287 288void 289Process::allocateMem(Addr vaddr, int64_t size, bool clobber) 290{ 291 int npages = divCeil(size, (int64_t)PageBytes); 292 Addr paddr = system->allocPhysPages(npages); 293 pTable->map(vaddr, paddr, size, 294 clobber ? PageTableBase::Clobber : PageTableBase::Zero); 295} 296 297bool 298Process::fixupStackFault(Addr vaddr) 299{ 300 // Check if this is already on the stack and there's just no page there 301 // yet. 302 if (vaddr >= stack_min && vaddr < stack_base) { 303 allocateMem(roundDown(vaddr, PageBytes), PageBytes); 304 return true; 305 } 306 307 // We've accessed the next page of the stack, so extend it to include 308 // this address. 309 if (vaddr < stack_min && vaddr >= stack_base - max_stack_size) { 310 while (vaddr < stack_min) { 311 stack_min -= TheISA::PageBytes; 312 if (stack_base - stack_min > max_stack_size) 313 fatal("Maximum stack size exceeded\n"); 314 allocateMem(stack_min, TheISA::PageBytes); 315 inform("Increasing stack size by one page."); 316 }; 317 return true; 318 } 319 return false; 320} 321 322void 323Process::fixFileOffsets() 324{ 325 auto seek = [] (FDEntry *fde) 326 { 327 if (lseek(fde->fd, fde->fileOffset, SEEK_SET) < 0) 328 fatal("Unable to see to location in %s", fde->filename); 329 }; 330 331 std::map<string,int>::iterator it; 332 333 // Search through the input options and set fd if match is found; 334 // otherwise, open an input file and seek to location. 335 FDEntry *fde_stdin = getFDEntry(STDIN_FILENO); 336 if ((it = imap.find(fde_stdin->filename)) != imap.end()) { 337 fde_stdin->fd = it->second; 338 } else { 339 fde_stdin->fd = openInputFile(fde_stdin->filename); 340 seek(fde_stdin); 341 } 342 343 // Search through the output/error options and set fd if match is found; 344 // otherwise, open an output file and seek to location. 345 FDEntry *fde_stdout = getFDEntry(STDOUT_FILENO); 346 if ((it = oemap.find(fde_stdout->filename)) != oemap.end()) { 347 fde_stdout->fd = it->second; 348 } else { 349 fde_stdout->fd = openOutputFile(fde_stdout->filename); 350 seek(fde_stdout); 351 } 352 353 FDEntry *fde_stderr = getFDEntry(STDERR_FILENO); 354 if (fde_stdout->filename == fde_stderr->filename) { 355 // Reuse the same file descriptor if these match. 356 fde_stderr->fd = fde_stdout->fd; 357 } else if ((it = oemap.find(fde_stderr->filename)) != oemap.end()) { 358 fde_stderr->fd = it->second; 359 } else { 360 fde_stderr->fd = openOutputFile(fde_stderr->filename); 361 seek(fde_stderr); 362 } 363 364 for (int tgt_fd = 3; tgt_fd < fd_array->size(); tgt_fd++) { 365 FDEntry *fde = getFDEntry(tgt_fd); 366 if (fde->fd == -1) 367 continue; 368 369 if (fde->isPipe) { 370 if (fde->filename == "PIPE-WRITE") 371 continue; 372 assert(fde->filename == "PIPE-READ"); 373 374 int fds[2]; 375 if (pipe(fds) < 0) 376 fatal("Unable to create new pipe"); 377 378 fde->fd = fds[0]; 379 380 FDEntry *fde_write = getFDEntry(fde->readPipeSource); 381 assert(fde_write->filename == "PIPE-WRITE"); 382 fde_write->fd = fds[1]; 383 } else { 384 fde->fd = openFile(fde->filename.c_str(), fde->flags, fde->mode); 385 seek(fde); 386 } 387 } 388} 389 390void 391Process::findFileOffsets() 392{ 393 for (auto& fde : *fd_array) { 394 if (fde.fd != -1) 395 fde.fileOffset = lseek(fde.fd, 0, SEEK_CUR); 396 } 397} 398 399void 400Process::setReadPipeSource(int read_pipe_fd, int source_fd) 401{ 402 FDEntry *fde = getFDEntry(read_pipe_fd); 403 assert(source_fd >= -1); 404 fde->readPipeSource = source_fd; 405} 406 407void 408Process::serialize(CheckpointOut &cp) const 409{ 410 SERIALIZE_SCALAR(brk_point); 411 SERIALIZE_SCALAR(stack_base); 412 SERIALIZE_SCALAR(stack_size); 413 SERIALIZE_SCALAR(stack_min); 414 SERIALIZE_SCALAR(next_thread_stack_base); 415 SERIALIZE_SCALAR(mmap_end); 416 SERIALIZE_SCALAR(nxm_start); 417 SERIALIZE_SCALAR(nxm_end); 418 pTable->serialize(cp); 419 for (int x = 0; x < fd_array->size(); x++) { 420 (*fd_array)[x].serializeSection(cp, csprintf("FDEntry%d", x)); 421 } 422 SERIALIZE_SCALAR(M5_pid); 423 424} 425 426void 427Process::unserialize(CheckpointIn &cp) 428{ 429 UNSERIALIZE_SCALAR(brk_point); 430 UNSERIALIZE_SCALAR(stack_base); 431 UNSERIALIZE_SCALAR(stack_size); 432 UNSERIALIZE_SCALAR(stack_min); 433 UNSERIALIZE_SCALAR(next_thread_stack_base); 434 UNSERIALIZE_SCALAR(mmap_end); 435 UNSERIALIZE_SCALAR(nxm_start); 436 UNSERIALIZE_SCALAR(nxm_end); 437 pTable->unserialize(cp); 438 for (int x = 0; x < fd_array->size(); x++) { 439 FDEntry *fde = getFDEntry(x); 440 fde->unserializeSection(cp, csprintf("FDEntry%d", x)); 441 } 442 fixFileOffsets(); 443 UNSERIALIZE_OPT_SCALAR(M5_pid); 444 // The above returns a bool so that you could do something if you don't 445 // find the param in the checkpoint if you wanted to, like set a default 446 // but in this case we'll just stick with the instantiated value if not 447 // found. 448} 449 450 451bool 452Process::map(Addr vaddr, Addr paddr, int size, bool cacheable) 453{ 454 pTable->map(vaddr, paddr, size, 455 cacheable ? PageTableBase::Zero : PageTableBase::Uncacheable); 456 return true; 457} 458 459 460//////////////////////////////////////////////////////////////////////// 461// 462// LiveProcess member definitions 463// 464//////////////////////////////////////////////////////////////////////// 465 466 467LiveProcess::LiveProcess(LiveProcessParams *params, ObjectFile *_objFile) 468 : Process(params), objFile(_objFile), 469 argv(params->cmd), envp(params->env), cwd(params->cwd), 470 executable(params->executable), 471 __uid(params->uid), __euid(params->euid), 472 __gid(params->gid), __egid(params->egid), 473 __pid(params->pid), __ppid(params->ppid), 474 drivers(params->drivers) 475{ 476 477 // load up symbols, if any... these may be used for debugging or 478 // profiling. 479 if (!debugSymbolTable) { 480 debugSymbolTable = new SymbolTable(); 481 if (!objFile->loadGlobalSymbols(debugSymbolTable) || 482 !objFile->loadLocalSymbols(debugSymbolTable) || 483 !objFile->loadWeakSymbols(debugSymbolTable)) { 484 // didn't load any symbols 485 delete debugSymbolTable; 486 debugSymbolTable = NULL; 487 } 488 } 489} 490 491void 492LiveProcess::syscall(int64_t callnum, ThreadContext *tc) 493{ 494 num_syscalls++; 495 496 SyscallDesc *desc = getDesc(callnum); 497 if (desc == NULL) 498 fatal("Syscall %d out of range", callnum); 499 500 desc->doSyscall(callnum, this, tc); 501} 502 503IntReg 504LiveProcess::getSyscallArg(ThreadContext *tc, int &i, int width) 505{ 506 return getSyscallArg(tc, i); 507} 508 509 510EmulatedDriver * 511LiveProcess::findDriver(std::string filename) 512{ 513 for (EmulatedDriver *d : drivers) { 514 if (d->match(filename)) 515 return d; 516 } 517 518 return NULL; 519} 520 521void 522LiveProcess::updateBias() 523{ 524 ObjectFile *interp = objFile->getInterpreter(); 525 526 if (!interp || !interp->relocatable()) 527 return; 528 529 // Determine how large the interpreters footprint will be in the process 530 // address space. 531 Addr interp_mapsize = roundUp(interp->mapSize(), TheISA::PageBytes); 532 533 // We are allocating the memory area; set the bias to the lowest address 534 // in the allocated memory region. 535 Addr ld_bias = mmapGrowsDown() ? mmap_end - interp_mapsize : mmap_end; 536 537 // Adjust the process mmap area to give the interpreter room; the real 538 // execve system call would just invoke the kernel's internal mmap 539 // functions to make these adjustments. 540 mmap_end = mmapGrowsDown() ? ld_bias : mmap_end + interp_mapsize; 541 542 interp->updateBias(ld_bias); 543} 544 545 546ObjectFile * 547LiveProcess::getInterpreter() 548{ 549 return objFile->getInterpreter(); 550} 551 552 553Addr 554LiveProcess::getBias() 555{ 556 ObjectFile *interp = getInterpreter(); 557 558 return interp ? interp->bias() : objFile->bias(); 559} 560 561 562Addr 563LiveProcess::getStartPC() 564{ 565 ObjectFile *interp = getInterpreter(); 566 567 return interp ? interp->entryPoint() : objFile->entryPoint(); 568} 569 570 571LiveProcess * 572LiveProcess::create(LiveProcessParams * params) 573{ 574 LiveProcess *process = NULL; 575 576 // If not specified, set the executable parameter equal to the 577 // simulated system's zeroth command line parameter 578 if (params->executable == "") { 579 params->executable = params->cmd[0]; 580 } 581 582 ObjectFile *objFile = createObjectFile(params->executable); 583 if (objFile == NULL) { 584 fatal("Can't load object file %s", params->executable); 585 } 586 587#if THE_ISA == ALPHA_ISA 588 if (objFile->getArch() != ObjectFile::Alpha) 589 fatal("Object file architecture does not match compiled ISA (Alpha)."); 590 591 switch (objFile->getOpSys()) { 592 case ObjectFile::Tru64: 593 process = new AlphaTru64Process(params, objFile); 594 break; 595 596 case ObjectFile::UnknownOpSys: 597 warn("Unknown operating system; assuming Linux."); 598 // fall through 599 case ObjectFile::Linux: 600 process = new AlphaLinuxProcess(params, objFile); 601 break; 602 603 default: 604 fatal("Unknown/unsupported operating system."); 605 } 606#elif THE_ISA == SPARC_ISA 607 if (objFile->getArch() != ObjectFile::SPARC64 && 608 objFile->getArch() != ObjectFile::SPARC32) 609 fatal("Object file architecture does not match compiled ISA (SPARC)."); 610 switch (objFile->getOpSys()) { 611 case ObjectFile::UnknownOpSys: 612 warn("Unknown operating system; assuming Linux."); 613 // fall through 614 case ObjectFile::Linux: 615 if (objFile->getArch() == ObjectFile::SPARC64) { 616 process = new Sparc64LinuxProcess(params, objFile); 617 } else { 618 process = new Sparc32LinuxProcess(params, objFile); 619 } 620 break; 621 622 623 case ObjectFile::Solaris: 624 process = new SparcSolarisProcess(params, objFile); 625 break; 626 627 default: 628 fatal("Unknown/unsupported operating system."); 629 } 630#elif THE_ISA == X86_ISA 631 if (objFile->getArch() != ObjectFile::X86_64 && 632 objFile->getArch() != ObjectFile::I386) 633 fatal("Object file architecture does not match compiled ISA (x86)."); 634 switch (objFile->getOpSys()) { 635 case ObjectFile::UnknownOpSys: 636 warn("Unknown operating system; assuming Linux."); 637 // fall through 638 case ObjectFile::Linux: 639 if (objFile->getArch() == ObjectFile::X86_64) { 640 process = new X86_64LinuxProcess(params, objFile); 641 } else { 642 process = new I386LinuxProcess(params, objFile); 643 } 644 break; 645 646 default: 647 fatal("Unknown/unsupported operating system."); 648 } 649#elif THE_ISA == MIPS_ISA 650 if (objFile->getArch() != ObjectFile::Mips) 651 fatal("Object file architecture does not match compiled ISA (MIPS)."); 652 switch (objFile->getOpSys()) { 653 case ObjectFile::UnknownOpSys: 654 warn("Unknown operating system; assuming Linux."); 655 // fall through 656 case ObjectFile::Linux: 657 process = new MipsLinuxProcess(params, objFile); 658 break; 659 660 default: 661 fatal("Unknown/unsupported operating system."); 662 } 663#elif THE_ISA == ARM_ISA 664 ObjectFile::Arch arch = objFile->getArch(); 665 if (arch != ObjectFile::Arm && arch != ObjectFile::Thumb && 666 arch != ObjectFile::Arm64) 667 fatal("Object file architecture does not match compiled ISA (ARM)."); 668 switch (objFile->getOpSys()) { 669 case ObjectFile::UnknownOpSys: 670 warn("Unknown operating system; assuming Linux."); 671 // fall through 672 case ObjectFile::Linux: 673 if (arch == ObjectFile::Arm64) { 674 process = new ArmLinuxProcess64(params, objFile, 675 objFile->getArch()); 676 } else { 677 process = new ArmLinuxProcess32(params, objFile, 678 objFile->getArch()); 679 } 680 break; 681 case ObjectFile::FreeBSD: 682 if (arch == ObjectFile::Arm64) { 683 process = new ArmFreebsdProcess64(params, objFile, 684 objFile->getArch()); 685 } else { 686 process = new ArmFreebsdProcess32(params, objFile, 687 objFile->getArch()); 688 } 689 break; 690 case ObjectFile::LinuxArmOABI: 691 fatal("M5 does not support ARM OABI binaries. Please recompile with an" 692 " EABI compiler."); 693 default: 694 fatal("Unknown/unsupported operating system."); 695 } 696#elif THE_ISA == POWER_ISA 697 if (objFile->getArch() != ObjectFile::Power) 698 fatal("Object file architecture does not match compiled ISA (Power)."); 699 switch (objFile->getOpSys()) { 700 case ObjectFile::UnknownOpSys: 701 warn("Unknown operating system; assuming Linux."); 702 // fall through 703 case ObjectFile::Linux: 704 process = new PowerLinuxProcess(params, objFile); 705 break; 706 707 default: 708 fatal("Unknown/unsupported operating system."); 709 } 710#else 711#error "THE_ISA not set" 712#endif 713 714 if (process == NULL) 715 fatal("Unknown error creating process object."); 716 return process; 717} 718 719LiveProcess * 720LiveProcessParams::create() 721{ 722 return LiveProcess::create(this); 723} 724