4ff852a590c12ad5f309aafd84e59f430665cc40
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 * Authors: Nathan Binkert
39 #include "base/intmath.hh"
40 #include "base/loader/object_file.hh"
41 #include "base/loader/symtab.hh"
42 #include "base/statistics.hh"
43 #include "config/full_system.hh"
44 #include "config/the_isa.hh"
45 #include "cpu/thread_context.hh"
46 #include "mem/page_table.hh"
47 #include "mem/physical.hh"
48 #include "mem/translating_port.hh"
49 #include "params/Process.hh"
50 #include "params/LiveProcess.hh"
51 #include "sim/debug.hh"
52 #include "sim/process.hh"
53 #include "sim/process_impl.hh"
54 #include "sim/stats.hh"
55 #include "sim/syscall_emul.hh"
56 #include "sim/system.hh"
58 #if THE_ISA == ALPHA_ISA
59 #include "arch/alpha/linux/process.hh"
60 #include "arch/alpha/tru64/process.hh"
61 #elif THE_ISA == SPARC_ISA
62 #include "arch/sparc/linux/process.hh"
63 #include "arch/sparc/solaris/process.hh"
64 #elif THE_ISA == MIPS_ISA
65 #include "arch/mips/linux/process.hh"
66 #elif THE_ISA == ARM_ISA
67 #include "arch/arm/linux/process.hh"
68 #elif THE_ISA == X86_ISA
69 #include "arch/x86/linux/process.hh"
70 #elif THE_ISA == POWER_ISA
71 #include "arch/power/linux/process.hh"
73 #error "THE_ISA not set"
78 using namespace TheISA
;
81 // The purpose of this code is to fake the loader & syscall mechanism
82 // when there's no OS: thus there's no resone to use it in FULL_SYSTEM
83 // mode when we do have an OS
86 #error "process.cc not compatible with FULL_SYSTEM"
89 // current number of allocated processes
90 int num_processes
= 0;
92 template<class IntType
>
93 AuxVector
<IntType
>::AuxVector(IntType type
, IntType val
)
95 a_type
= TheISA::htog(type
);
96 a_val
= TheISA::htog(val
);
99 template class AuxVector
<uint32_t>;
100 template class AuxVector
<uint64_t>;
102 Process::Process(ProcessParams
* params
)
103 : SimObject(params
), system(params
->system
), checkpointRestored(false),
104 max_stack_size(params
->max_stack_size
)
106 string in
= params
->input
;
107 string out
= params
->output
;
108 string err
= params
->errout
;
110 // initialize file descriptors to default: same as simulator
111 int stdin_fd
, stdout_fd
, stderr_fd
;
113 if (in
== "stdin" || in
== "cin")
114 stdin_fd
= STDIN_FILENO
;
115 else if (in
== "None")
118 stdin_fd
= Process::openInputFile(in
);
120 if (out
== "stdout" || out
== "cout")
121 stdout_fd
= STDOUT_FILENO
;
122 else if (out
== "stderr" || out
== "cerr")
123 stdout_fd
= STDERR_FILENO
;
124 else if (out
== "None")
127 stdout_fd
= Process::openOutputFile(out
);
129 if (err
== "stdout" || err
== "cout")
130 stderr_fd
= STDOUT_FILENO
;
131 else if (err
== "stderr" || err
== "cerr")
132 stderr_fd
= STDERR_FILENO
;
133 else if (err
== "None")
136 stderr_fd
= stdout_fd
;
138 stderr_fd
= Process::openOutputFile(err
);
140 M5_pid
= system
->allocatePID();
141 // initialize first 3 fds (stdin, stdout, stderr)
142 Process::FdMap
*fdo
= &fd_map
[STDIN_FILENO
];
145 fdo
->flags
= O_RDONLY
;
149 fdo
= &fd_map
[STDOUT_FILENO
];
152 fdo
->flags
= O_WRONLY
| O_CREAT
| O_TRUNC
;
156 fdo
= &fd_map
[STDERR_FILENO
];
159 fdo
->flags
= O_WRONLY
;
164 // mark remaining fds as free
165 for (int i
= 3; i
<= MAX_FD
; ++i
) {
166 Process::FdMap
*fdo
= &fd_map
[i
];
170 mmap_start
= mmap_end
= 0;
171 nxm_start
= nxm_end
= 0;
172 pTable
= new PageTable(this);
173 // other parameters will be initialized when the program is loaded
180 using namespace Stats
;
183 .name(name() + ".PROG:num_syscalls")
184 .desc("Number of system calls")
189 // static helper functions
192 Process::openInputFile(const string
&filename
)
194 int fd
= open(filename
.c_str(), O_RDONLY
);
198 cerr
<< "unable to open \"" << filename
<< "\" for reading\n";
199 fatal("can't open input file");
207 Process::openOutputFile(const string
&filename
)
209 int fd
= open(filename
.c_str(), O_WRONLY
| O_CREAT
| O_TRUNC
, 0664);
213 cerr
<< "unable to open \"" << filename
<< "\" for writing\n";
214 fatal("can't open output file");
221 Process::findFreeContext()
223 int size
= contextIds
.size();
225 for (int i
= 0; i
< size
; ++i
) {
226 tc
= system
->getThreadContext(contextIds
[i
]);
227 if (tc
->status() == ThreadContext::Halted
) {
228 // inactive context, free to use
238 if (contextIds
.empty())
239 fatal("Process %s is not associated with any HW contexts!\n", name());
241 // first thread context for this process... initialize & enable
242 ThreadContext
*tc
= system
->getThreadContext(contextIds
[0]);
244 // mark this context as active so it will start ticking.
248 mem_port
= system
->physmem
->getPort("functional");
249 initVirtMem
= new TranslatingPort("process init port", this,
250 TranslatingPort::Always
);
251 mem_port
->setPeer(initVirtMem
);
252 initVirtMem
->setPeer(mem_port
);
255 // map simulator fd sim_fd to target fd tgt_fd
257 Process::dup_fd(int sim_fd
, int tgt_fd
)
259 if (tgt_fd
< 0 || tgt_fd
> MAX_FD
)
260 panic("Process::dup_fd tried to dup past MAX_FD (%d)", tgt_fd
);
262 Process::FdMap
*fdo
= &fd_map
[tgt_fd
];
267 // generate new target fd for sim_fd
269 Process::alloc_fd(int sim_fd
, string filename
, int flags
, int mode
, bool pipe
)
271 // in case open() returns an error, don't allocate a new fd
275 // find first free target fd
276 for (int free_fd
= 0; free_fd
<= MAX_FD
; ++free_fd
) {
277 Process::FdMap
*fdo
= &fd_map
[free_fd
];
280 fdo
->filename
= filename
;
285 fdo
->readPipeSource
= 0;
290 panic("Process::alloc_fd: out of file descriptors!");
294 // free target fd (e.g., after close)
296 Process::free_fd(int tgt_fd
)
298 Process::FdMap
*fdo
= &fd_map
[tgt_fd
];
300 warn("Process::free_fd: request to free unused fd %d", tgt_fd
);
303 fdo
->filename
= "NULL";
308 fdo
->readPipeSource
= 0;
312 // look up simulator fd for given target fd
314 Process::sim_fd(int tgt_fd
)
319 return fd_map
[tgt_fd
].fd
;
323 Process::sim_fd_obj(int tgt_fd
)
326 panic("sim_fd_obj called in fd out of range.");
328 return &fd_map
[tgt_fd
];
332 Process::checkAndAllocNextPage(Addr vaddr
)
334 // if this is an initial write we might not have
335 if (vaddr
>= stack_min
&& vaddr
< stack_base
) {
336 pTable
->allocate(roundDown(vaddr
, VMPageSize
), VMPageSize
);
340 // We've accessed the next page of the stack, so extend the stack
342 if (vaddr
< stack_min
&& vaddr
>= stack_base
- max_stack_size
) {
343 while (vaddr
< stack_min
) {
344 stack_min
-= TheISA::PageBytes
;
345 if(stack_base
- stack_min
> max_stack_size
)
346 fatal("Maximum stack size exceeded\n");
347 if(stack_base
- stack_min
> 8*1024*1024)
348 fatal("Over max stack size for one thread\n");
349 pTable
->allocate(stack_min
, TheISA::PageBytes
);
350 inform("Increasing stack size by one page.");
357 // find all offsets for currently open files and save them
359 Process::fix_file_offsets()
361 Process::FdMap
*fdo_stdin
= &fd_map
[STDIN_FILENO
];
362 Process::FdMap
*fdo_stdout
= &fd_map
[STDOUT_FILENO
];
363 Process::FdMap
*fdo_stderr
= &fd_map
[STDERR_FILENO
];
364 string in
= fdo_stdin
->filename
;
365 string out
= fdo_stdout
->filename
;
366 string err
= fdo_stderr
->filename
;
368 // initialize file descriptors to default: same as simulator
369 int stdin_fd
, stdout_fd
, stderr_fd
;
371 if (in
== "stdin" || in
== "cin")
372 stdin_fd
= STDIN_FILENO
;
373 else if (in
== "None")
376 // open standard in and seek to the right location
377 stdin_fd
= Process::openInputFile(in
);
378 if (lseek(stdin_fd
, fdo_stdin
->fileOffset
, SEEK_SET
) < 0)
379 panic("Unable to seek to correct location in file: %s", in
);
382 if (out
== "stdout" || out
== "cout")
383 stdout_fd
= STDOUT_FILENO
;
384 else if (out
== "stderr" || out
== "cerr")
385 stdout_fd
= STDERR_FILENO
;
386 else if (out
== "None")
389 stdout_fd
= Process::openOutputFile(out
);
390 if (lseek(stdout_fd
, fdo_stdout
->fileOffset
, SEEK_SET
) < 0)
391 panic("Unable to seek to correct location in file: %s", out
);
394 if (err
== "stdout" || err
== "cout")
395 stderr_fd
= STDOUT_FILENO
;
396 else if (err
== "stderr" || err
== "cerr")
397 stderr_fd
= STDERR_FILENO
;
398 else if (err
== "None")
401 stderr_fd
= stdout_fd
;
403 stderr_fd
= Process::openOutputFile(err
);
404 if (lseek(stderr_fd
, fdo_stderr
->fileOffset
, SEEK_SET
) < 0)
405 panic("Unable to seek to correct location in file: %s", err
);
408 fdo_stdin
->fd
= stdin_fd
;
409 fdo_stdout
->fd
= stdout_fd
;
410 fdo_stderr
->fd
= stderr_fd
;
413 for (int free_fd
= 3; free_fd
<= MAX_FD
; ++free_fd
) {
414 Process::FdMap
*fdo
= &fd_map
[free_fd
];
417 if (fdo
->filename
== "PIPE-WRITE")
420 assert (fdo
->filename
== "PIPE-READ");
423 int pipe_retval
= pipe(fds
);
425 if (pipe_retval
< 0) {
427 panic("Unable to create new pipe.");
429 fdo
->fd
= fds
[0]; //set read pipe
430 Process::FdMap
*fdo_write
= &fd_map
[fdo
->readPipeSource
];
431 if (fdo_write
->filename
!= "PIPE-WRITE")
432 panic ("Couldn't find write end of the pipe");
434 fdo_write
->fd
= fds
[1];//set write pipe
438 int fd
= open(fdo
->filename
.c_str(), fdo
->flags
, fdo
->mode
);
441 panic("Unable to open file: %s", fdo
->filename
);
444 //Seek to correct location before checkpoint
445 if (lseek(fd
,fdo
->fileOffset
, SEEK_SET
) < 0)
446 panic("Unable to seek to correct location in file: %s",
454 Process::find_file_offsets()
456 for (int free_fd
= 0; free_fd
<= MAX_FD
; ++free_fd
) {
457 Process::FdMap
*fdo
= &fd_map
[free_fd
];
459 fdo
->fileOffset
= lseek(fdo
->fd
, 0, SEEK_CUR
);
461 fdo
->filename
= "NULL";
468 Process::setReadPipeSource(int read_pipe_fd
, int source_fd
)
470 Process::FdMap
*fdo
= &fd_map
[read_pipe_fd
];
471 fdo
->readPipeSource
= source_fd
;
475 Process::FdMap::serialize(std::ostream
&os
)
477 SERIALIZE_SCALAR(fd
);
478 SERIALIZE_SCALAR(isPipe
);
479 SERIALIZE_SCALAR(filename
);
480 SERIALIZE_SCALAR(flags
);
481 SERIALIZE_SCALAR(readPipeSource
);
482 SERIALIZE_SCALAR(fileOffset
);
486 Process::FdMap::unserialize(Checkpoint
*cp
, const std::string
§ion
)
488 UNSERIALIZE_SCALAR(fd
);
489 UNSERIALIZE_SCALAR(isPipe
);
490 UNSERIALIZE_SCALAR(filename
);
491 UNSERIALIZE_SCALAR(flags
);
492 UNSERIALIZE_SCALAR(readPipeSource
);
493 UNSERIALIZE_SCALAR(fileOffset
);
497 Process::serialize(std::ostream
&os
)
499 SERIALIZE_SCALAR(initialContextLoaded
);
500 SERIALIZE_SCALAR(brk_point
);
501 SERIALIZE_SCALAR(stack_base
);
502 SERIALIZE_SCALAR(stack_size
);
503 SERIALIZE_SCALAR(stack_min
);
504 SERIALIZE_SCALAR(next_thread_stack_base
);
505 SERIALIZE_SCALAR(mmap_start
);
506 SERIALIZE_SCALAR(mmap_end
);
507 SERIALIZE_SCALAR(nxm_start
);
508 SERIALIZE_SCALAR(nxm_end
);
510 pTable
->serialize(os
);
511 for (int x
= 0; x
<= MAX_FD
; x
++) {
512 nameOut(os
, csprintf("%s.FdMap%d", name(), x
));
513 fd_map
[x
].serialize(os
);
515 SERIALIZE_SCALAR(M5_pid
);
520 Process::unserialize(Checkpoint
*cp
, const std::string
§ion
)
522 UNSERIALIZE_SCALAR(initialContextLoaded
);
523 UNSERIALIZE_SCALAR(brk_point
);
524 UNSERIALIZE_SCALAR(stack_base
);
525 UNSERIALIZE_SCALAR(stack_size
);
526 UNSERIALIZE_SCALAR(stack_min
);
527 UNSERIALIZE_SCALAR(next_thread_stack_base
);
528 UNSERIALIZE_SCALAR(mmap_start
);
529 UNSERIALIZE_SCALAR(mmap_end
);
530 UNSERIALIZE_SCALAR(nxm_start
);
531 UNSERIALIZE_SCALAR(nxm_end
);
532 pTable
->unserialize(cp
, section
);
533 for (int x
= 0; x
<= MAX_FD
; x
++) {
534 fd_map
[x
].unserialize(cp
, csprintf("%s.FdMap%d", section
, x
));
537 UNSERIALIZE_OPT_SCALAR(M5_pid
);
538 // The above returns a bool so that you could do something if you don't
539 // find the param in the checkpoint if you wanted to, like set a default
540 // but in this case we'll just stick with the instantianted value if not
543 checkpointRestored
= true;
548 ////////////////////////////////////////////////////////////////////////
550 // LiveProcess member definitions
552 ////////////////////////////////////////////////////////////////////////
555 LiveProcess::LiveProcess(LiveProcessParams
* params
, ObjectFile
*_objFile
)
556 : Process(params
), objFile(_objFile
),
557 argv(params
->cmd
), envp(params
->env
), cwd(params
->cwd
)
560 __euid
= params
->euid
;
562 __egid
= params
->egid
;
564 __ppid
= params
->ppid
;
566 prog_fname
= params
->cmd
[0];
568 // load up symbols, if any... these may be used for debugging or
570 if (!debugSymbolTable
) {
571 debugSymbolTable
= new SymbolTable();
572 if (!objFile
->loadGlobalSymbols(debugSymbolTable
) ||
573 !objFile
->loadLocalSymbols(debugSymbolTable
)) {
574 // didn't load any symbols
575 delete debugSymbolTable
;
576 debugSymbolTable
= NULL
;
582 LiveProcess::argsInit(int intSize
, int pageSize
)
586 // load object file into target memory
587 objFile
->loadSections(initVirtMem
);
589 // Calculate how much space we need for arg & env arrays.
590 int argv_array_size
= intSize
* (argv
.size() + 1);
591 int envp_array_size
= intSize
* (envp
.size() + 1);
592 int arg_data_size
= 0;
593 for (vector
<string
>::size_type i
= 0; i
< argv
.size(); ++i
) {
594 arg_data_size
+= argv
[i
].size() + 1;
596 int env_data_size
= 0;
597 for (vector
<string
>::size_type i
= 0; i
< envp
.size(); ++i
) {
598 env_data_size
+= envp
[i
].size() + 1;
602 argv_array_size
+ envp_array_size
+ arg_data_size
+ env_data_size
;
603 if (space_needed
< 32*1024)
604 space_needed
= 32*1024;
606 // set bottom of stack
607 stack_min
= stack_base
- space_needed
;
609 stack_min
= roundDown(stack_min
, pageSize
);
610 stack_size
= stack_base
- stack_min
;
612 pTable
->allocate(stack_min
, roundUp(stack_size
, pageSize
));
614 // map out initial stack contents
615 Addr argv_array_base
= stack_min
+ intSize
; // room for argc
616 Addr envp_array_base
= argv_array_base
+ argv_array_size
;
617 Addr arg_data_base
= envp_array_base
+ envp_array_size
;
618 Addr env_data_base
= arg_data_base
+ arg_data_size
;
620 // write contents to stack
621 uint64_t argc
= argv
.size();
623 argc
= htog((uint64_t)argc
);
624 else if (intSize
== 4)
625 argc
= htog((uint32_t)argc
);
627 panic("Unknown int size");
629 initVirtMem
->writeBlob(stack_min
, (uint8_t*)&argc
, intSize
);
631 copyStringArray(argv
, argv_array_base
, arg_data_base
, initVirtMem
);
632 copyStringArray(envp
, envp_array_base
, env_data_base
, initVirtMem
);
634 ThreadContext
*tc
= system
->getThreadContext(contextIds
[0]);
636 setSyscallArg(tc
, 0, argc
);
637 setSyscallArg(tc
, 1, argv_array_base
);
638 tc
->setIntReg(StackPointerReg
, stack_min
);
640 Addr prog_entry
= objFile
->entryPoint();
641 tc
->setPC(prog_entry
);
642 tc
->setNextPC(prog_entry
+ sizeof(MachInst
));
644 #if THE_ISA != ALPHA_ISA && THE_ISA != POWER_ISA //e.g. MIPS or Sparc
645 tc
->setNextNPC(prog_entry
+ (2 * sizeof(MachInst
)));
652 LiveProcess::syscall(int64_t callnum
, ThreadContext
*tc
)
656 SyscallDesc
*desc
= getDesc(callnum
);
658 fatal("Syscall %d out of range", callnum
);
660 desc
->doSyscall(callnum
, this, tc
);
664 LiveProcess::getSyscallArg(ThreadContext
*tc
, int &i
, int width
)
666 return getSyscallArg(tc
, i
);
670 LiveProcess::create(LiveProcessParams
* params
)
672 LiveProcess
*process
= NULL
;
675 params
->executable
== "" ? params
->cmd
[0] : params
->executable
;
676 ObjectFile
*objFile
= createObjectFile(executable
);
677 if (objFile
== NULL
) {
678 fatal("Can't load object file %s", executable
);
681 if (objFile
->isDynamic())
682 fatal("Object file is a dynamic executable however only static "
683 "executables are supported!\n Please recompile your "
684 "executable as a static binary and try again.\n");
686 #if THE_ISA == ALPHA_ISA
687 if (objFile
->getArch() != ObjectFile::Alpha
)
688 fatal("Object file architecture does not match compiled ISA (Alpha).");
690 switch (objFile
->getOpSys()) {
691 case ObjectFile::Tru64
:
692 process
= new AlphaTru64Process(params
, objFile
);
695 case ObjectFile::UnknownOpSys
:
696 warn("Unknown operating system; assuming Linux.");
698 case ObjectFile::Linux
:
699 process
= new AlphaLinuxProcess(params
, objFile
);
703 fatal("Unknown/unsupported operating system.");
705 #elif THE_ISA == SPARC_ISA
706 if (objFile
->getArch() != ObjectFile::SPARC64
&&
707 objFile
->getArch() != ObjectFile::SPARC32
)
708 fatal("Object file architecture does not match compiled ISA (SPARC).");
709 switch (objFile
->getOpSys()) {
710 case ObjectFile::UnknownOpSys
:
711 warn("Unknown operating system; assuming Linux.");
713 case ObjectFile::Linux
:
714 if (objFile
->getArch() == ObjectFile::SPARC64
) {
715 process
= new Sparc64LinuxProcess(params
, objFile
);
717 process
= new Sparc32LinuxProcess(params
, objFile
);
722 case ObjectFile::Solaris
:
723 process
= new SparcSolarisProcess(params
, objFile
);
727 fatal("Unknown/unsupported operating system.");
729 #elif THE_ISA == X86_ISA
730 if (objFile
->getArch() != ObjectFile::X86_64
&&
731 objFile
->getArch() != ObjectFile::I386
)
732 fatal("Object file architecture does not match compiled ISA (x86).");
733 switch (objFile
->getOpSys()) {
734 case ObjectFile::UnknownOpSys
:
735 warn("Unknown operating system; assuming Linux.");
737 case ObjectFile::Linux
:
738 if (objFile
->getArch() == ObjectFile::X86_64
) {
739 process
= new X86_64LinuxProcess(params
, objFile
);
741 process
= new I386LinuxProcess(params
, objFile
);
746 fatal("Unknown/unsupported operating system.");
748 #elif THE_ISA == MIPS_ISA
749 if (objFile
->getArch() != ObjectFile::Mips
)
750 fatal("Object file architecture does not match compiled ISA (MIPS).");
751 switch (objFile
->getOpSys()) {
752 case ObjectFile::UnknownOpSys
:
753 warn("Unknown operating system; assuming Linux.");
755 case ObjectFile::Linux
:
756 process
= new MipsLinuxProcess(params
, objFile
);
760 fatal("Unknown/unsupported operating system.");
762 #elif THE_ISA == ARM_ISA
763 if (objFile
->getArch() != ObjectFile::Arm
&&
764 objFile
->getArch() != ObjectFile::Thumb
)
765 fatal("Object file architecture does not match compiled ISA (ARM).");
766 switch (objFile
->getOpSys()) {
767 case ObjectFile::UnknownOpSys
:
768 warn("Unknown operating system; assuming Linux.");
770 case ObjectFile::Linux
:
771 process
= new ArmLinuxProcess(params
, objFile
, objFile
->getArch());
773 case ObjectFile::LinuxArmOABI
:
774 fatal("M5 does not support ARM OABI binaries. Please recompile with an"
777 fatal("Unknown/unsupported operating system.");
779 #elif THE_ISA == POWER_ISA
780 if (objFile
->getArch() != ObjectFile::Power
)
781 fatal("Object file architecture does not match compiled ISA (Power).");
782 switch (objFile
->getOpSys()) {
783 case ObjectFile::UnknownOpSys
:
784 warn("Unknown operating system; assuming Linux.");
786 case ObjectFile::Linux
:
787 process
= new PowerLinuxProcess(params
, objFile
);
791 fatal("Unknown/unsupported operating system.");
794 #error "THE_ISA not set"
799 fatal("Unknown error creating process object.");
804 LiveProcessParams::create()
806 return LiveProcess::create(this);