process.cc (3917:a6cc1842f529) process.cc (3971:e935846cccfa)
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
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;

--- 21 unchanged lines hidden (view full) ---

30 * Ali Saidi
31 */
32
33#include <unistd.h>
34#include <fcntl.h>
35
36#include <string>
37
1/*
2 * Copyright (c) 2001-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
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;

--- 21 unchanged lines hidden (view full) ---

30 * Ali Saidi
31 */
32
33#include <unistd.h>
34#include <fcntl.h>
35
36#include <string>
37
38#include "arch/remote_gdb.hh"
38#include "base/intmath.hh"
39#include "base/loader/object_file.hh"
40#include "base/loader/symtab.hh"
41#include "base/statistics.hh"
42#include "config/full_system.hh"
43#include "cpu/thread_context.hh"
44#include "mem/page_table.hh"
45#include "mem/physical.hh"

--- 103 unchanged lines hidden (view full) ---

149
150int
151Process::registerThreadContext(ThreadContext *tc)
152{
153 // add to list
154 int myIndex = threadContexts.size();
155 threadContexts.push_back(tc);
156
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 "cpu/thread_context.hh"
45#include "mem/page_table.hh"
46#include "mem/physical.hh"

--- 103 unchanged lines hidden (view full) ---

150
151int
152Process::registerThreadContext(ThreadContext *tc)
153{
154 // add to list
155 int myIndex = threadContexts.size();
156 threadContexts.push_back(tc);
157
158 RemoteGDB *rgdb = new RemoteGDB(system, tc);
159 GDBListener *gdbl = new GDBListener(rgdb, 7000 + myIndex);
160 gdbl->listen();
161 //gdbl->accept();
162
163 remoteGDB.push_back(rgdb);
164
157 // return CPU number to caller
158 return myIndex;
159}
160
161void
162Process::startup()
163{
164 if (threadContexts.empty())

--- 270 unchanged lines hidden (view full) ---

435{
436 LiveProcess *process = NULL;
437
438 ObjectFile *objFile = createObjectFile(executable);
439 if (objFile == NULL) {
440 fatal("Can't load object file %s", executable);
441 }
442
165 // return CPU number to caller
166 return myIndex;
167}
168
169void
170Process::startup()
171{
172 if (threadContexts.empty())

--- 270 unchanged lines hidden (view full) ---

443{
444 LiveProcess *process = NULL;
445
446 ObjectFile *objFile = createObjectFile(executable);
447 if (objFile == NULL) {
448 fatal("Can't load object file %s", executable);
449 }
450
443 if (objFile->isDynamic())
444 fatal("Object file is a dynamic executable however only static "
445 "executables are supported!\n Please recompile your "
446 "executable as a static binary and try again.\n");
447
448#if THE_ISA == ALPHA_ISA
449 if (objFile->getArch() != ObjectFile::Alpha)
450 fatal("Object file architecture does not match compiled ISA (Alpha).");
451 switch (objFile->getOpSys()) {
452 case ObjectFile::Tru64:
453 process = new AlphaTru64Process(nm, objFile, system,
454 stdin_fd, stdout_fd, stderr_fd,
455 argv, envp, cwd,

--- 128 unchanged lines hidden ---
451#if THE_ISA == ALPHA_ISA
452 if (objFile->getArch() != ObjectFile::Alpha)
453 fatal("Object file architecture does not match compiled ISA (Alpha).");
454 switch (objFile->getOpSys()) {
455 case ObjectFile::Tru64:
456 process = new AlphaTru64Process(nm, objFile, system,
457 stdin_fd, stdout_fd, stderr_fd,
458 argv, envp, cwd,

--- 128 unchanged lines hidden ---