Deleted Added
sdiff udiff text old ( 4117:2807cee7b892 ) new ( 4434:2ea7b6e0b78f )
full compact
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;

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

40#include "config/full_system.hh"
41
42#if !FULL_SYSTEM
43
44#include <string>
45#include <vector>
46
47#include "base/statistics.hh"
48#include "mem/translating_port.hh"
49#include "sim/host.hh"
50#include "sim/sim_object.hh"
51
52class ThreadContext;
53class SyscallDesc;
54class PageTable;
55class TranslatingPort;
56class System;
57class GDBListener;
58namespace TheISA
59{
60 class RemoteGDB;
61}
62
63//This needs to be templated for cases where 32 bit pointers are needed.
64template<class AddrType>
65void
66copyStringArray(std::vector<std::string> &strings,
67 AddrType array_ptr, AddrType data_ptr,
68 TranslatingPort* memPort)
69{
70 AddrType data_ptr_swap;
71 for (int i = 0; i < strings.size(); ++i) {
72 data_ptr_swap = htog(data_ptr);
73 memPort->writeBlob(array_ptr, (uint8_t*)&data_ptr_swap,
74 sizeof(AddrType));
75 memPort->writeString(data_ptr, strings[i].c_str());
76 array_ptr += sizeof(AddrType);
77 data_ptr += strings[i].size() + 1;
78 }
79 // add NULL terminator
80 data_ptr = 0;
81
82 memPort->writeBlob(array_ptr, (uint8_t*)&data_ptr, sizeof(AddrType));
83}
84
85class Process : public SimObject
86{
87 public:
88
89 /// Pointer to object representing the system this process is
90 /// running on.
91 System *system;
92

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

189 // free target fd (e.g., after close)
190 void free_fd(int tgt_fd);
191
192 // look up simulator fd for given target fd
193 int sim_fd(int tgt_fd);
194
195 virtual void syscall(int64_t callnum, ThreadContext *tc) = 0;
196
197 void serialize(std::ostream &os);
198 void unserialize(Checkpoint *cp, const std::string &section);
199};
200
201//
202// "Live" process with system calls redirected to host system
203//
204class ObjectFile;

--- 75 unchanged lines hidden ---