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" |
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 |
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 |
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()); |
260 |
261 gdbl->accept(); 262 } |
263 if (remoteGDB.size() <= id) { 264 remoteGDB.resize(id + 1); 265 } 266 267 remoteGDB[id] = rgdb; 268 } 269#endif 270 --- 249 unchanged lines hidden --- |