Deleted Added
sdiff udiff text old ( 12272:bcc67ee98e6d ) new ( 12443:0479f5e6f8bd )
full compact
1/*
2 * Copyright (c) 2011-2014,2017 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

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

236 if (remoteGDB.size())
237 return remoteGDB[0]->breakpoint();
238 return false;
239}
240
241ContextID
242System::registerThreadContext(ThreadContext *tc, ContextID assigned)
243{
244 int id;
245 if (assigned == InvalidContextID) {
246 for (id = 0; id < threadContexts.size(); id++) {
247 if (!threadContexts[id])
248 break;
249 }
250
251 if (threadContexts.size() <= id)
252 threadContexts.resize(id + 1);
253 } else {
254 if (threadContexts.size() <= assigned)
255 threadContexts.resize(assigned + 1);
256 id = assigned;
257 }
258
259 if (threadContexts[id])
260 fatal("Cannot have two CPUs with the same id (%d)\n", id);
261
262 threadContexts[id] = tc;
263 _numContexts++;
264
265#if THE_ISA != NULL_ISA
266 int port = getRemoteGDBPort();
267 if (port) {
268 RemoteGDB *rgdb = new RemoteGDB(this, tc);
269 GDBListener *gdbl = new GDBListener(rgdb, port + id);

--- 270 unchanged lines hidden ---