system.cc (12100:5f19ea125548) system.cc (12122:20512f6810d7)
1/*
2 * Copyright (c) 2011-2014 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

53#include "base/loader/symtab.hh"
54#include "base/str.hh"
55#include "base/trace.hh"
56#include "config/use_kvm.hh"
57#if USE_KVM
58#include "cpu/kvm/base.hh"
59#include "cpu/kvm/vm.hh"
60#endif
1/*
2 * Copyright (c) 2011-2014 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

53#include "base/loader/symtab.hh"
54#include "base/str.hh"
55#include "base/trace.hh"
56#include "config/use_kvm.hh"
57#if USE_KVM
58#include "cpu/kvm/base.hh"
59#include "cpu/kvm/vm.hh"
60#endif
61#include "cpu/base.hh"
61#include "cpu/thread_context.hh"
62#include "debug/Loader.hh"
63#include "debug/WorkItems.hh"
64#include "mem/abstract_mem.hh"
65#include "mem/physical.hh"
66#include "params/System.hh"
67#include "sim/byteswap.hh"
68#include "sim/debug.hh"

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

216
217bool System::breakpoint()
218{
219 if (remoteGDB.size())
220 return remoteGDB[0]->breakpoint();
221 return false;
222}
223
62#include "cpu/thread_context.hh"
63#include "debug/Loader.hh"
64#include "debug/WorkItems.hh"
65#include "mem/abstract_mem.hh"
66#include "mem/physical.hh"
67#include "params/System.hh"
68#include "sim/byteswap.hh"
69#include "sim/debug.hh"

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

217
218bool System::breakpoint()
219{
220 if (remoteGDB.size())
221 return remoteGDB[0]->breakpoint();
222 return false;
223}
224
224/**
225 * Setting rgdb_wait to a positive integer waits for a remote debugger to
226 * connect to that context ID before continuing. This should really
227 be a parameter on the CPU object or something...
228 */
229int rgdb_wait = -1;
230
231ContextID
232System::registerThreadContext(ThreadContext *tc, ContextID assigned)
233{
234 int id;
235 if (assigned == InvalidContextID) {
236 for (id = 0; id < threadContexts.size(); id++) {
237 if (!threadContexts[id])
238 break;

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

254
255#if THE_ISA != NULL_ISA
256 int port = getRemoteGDBPort();
257 if (port) {
258 RemoteGDB *rgdb = new RemoteGDB(this, tc);
259 GDBListener *gdbl = new GDBListener(rgdb, port + id);
260 gdbl->listen();
261
225ContextID
226System::registerThreadContext(ThreadContext *tc, ContextID assigned)
227{
228 int id;
229 if (assigned == InvalidContextID) {
230 for (id = 0; id < threadContexts.size(); id++) {
231 if (!threadContexts[id])
232 break;

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

248
249#if THE_ISA != NULL_ISA
250 int port = getRemoteGDBPort();
251 if (port) {
252 RemoteGDB *rgdb = new RemoteGDB(this, tc);
253 GDBListener *gdbl = new GDBListener(rgdb, port + id);
254 gdbl->listen();
255
262 if (rgdb_wait != -1 && rgdb_wait == id)
263 gdbl->accept();
256 BaseCPU *cpu = tc->getCpuPtr();
257 if (cpu->waitForRemoteGDB()) {
258 inform("%s: Waiting for a remote GDB connection on port %d.\n",
259 cpu->name(), gdbl->getPort());
264
260
261 gdbl->accept();
262 }
265 if (remoteGDB.size() <= id) {
266 remoteGDB.resize(id + 1);
267 }
268
269 remoteGDB[id] = rgdb;
270 }
271#endif
272

--- 249 unchanged lines hidden ---
263 if (remoteGDB.size() <= id) {
264 remoteGDB.resize(id + 1);
265 }
266
267 remoteGDB[id] = rgdb;
268 }
269#endif
270

--- 249 unchanged lines hidden ---