process.cc (10932:cafae9abd4e4) | process.cc (11140:cf07f8bf58db) |
---|---|
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 --- 458 unchanged lines hidden (view full) --- 467// LiveProcess member definitions 468// 469//////////////////////////////////////////////////////////////////////// 470 471 472LiveProcess::LiveProcess(LiveProcessParams *params, ObjectFile *_objFile) 473 : Process(params), objFile(_objFile), 474 argv(params->cmd), envp(params->env), cwd(params->cwd), | 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 --- 458 unchanged lines hidden (view full) --- 467// LiveProcess member definitions 468// 469//////////////////////////////////////////////////////////////////////// 470 471 472LiveProcess::LiveProcess(LiveProcessParams *params, ObjectFile *_objFile) 473 : Process(params), objFile(_objFile), 474 argv(params->cmd), envp(params->env), cwd(params->cwd), |
475 executable(params->executable), |
|
475 __uid(params->uid), __euid(params->euid), 476 __gid(params->gid), __egid(params->egid), 477 __pid(params->pid), __ppid(params->ppid), 478 drivers(params->drivers) 479{ 480 481 // load up symbols, if any... these may be used for debugging or 482 // profiling. --- 40 unchanged lines hidden (view full) --- 523} 524 525 526LiveProcess * 527LiveProcess::create(LiveProcessParams * params) 528{ 529 LiveProcess *process = NULL; 530 | 476 __uid(params->uid), __euid(params->euid), 477 __gid(params->gid), __egid(params->egid), 478 __pid(params->pid), __ppid(params->ppid), 479 drivers(params->drivers) 480{ 481 482 // load up symbols, if any... these may be used for debugging or 483 // profiling. --- 40 unchanged lines hidden (view full) --- 524} 525 526 527LiveProcess * 528LiveProcess::create(LiveProcessParams * params) 529{ 530 LiveProcess *process = NULL; 531 |
531 string executable = 532 params->executable == "" ? params->cmd[0] : params->executable; 533 ObjectFile *objFile = createObjectFile(executable); | 532 // If not specified, set the executable parameter equal to the 533 // simulated system's zeroth command line parameter 534 if (params->executable == "") { 535 params->executable = params->cmd[0]; 536 } 537 538 ObjectFile *objFile = createObjectFile(params->executable); |
534 if (objFile == NULL) { | 539 if (objFile == NULL) { |
535 fatal("Can't load object file %s", executable); | 540 fatal("Can't load object file %s", params->executable); |
536 } 537 538 if (objFile->isDynamic()) 539 fatal("Object file is a dynamic executable however only static " 540 "executables are supported!\n Please recompile your " 541 "executable as a static binary and try again.\n"); 542 543#if THE_ISA == ALPHA_ISA --- 136 unchanged lines hidden --- | 541 } 542 543 if (objFile->isDynamic()) 544 fatal("Object file is a dynamic executable however only static " 545 "executables are supported!\n Please recompile your " 546 "executable as a static binary and try again.\n"); 547 548#if THE_ISA == ALPHA_ISA --- 136 unchanged lines hidden --- |