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 = assigned; 245 if (id == InvalidContextID) { 246 // Find an unused context ID for this thread. 247 id = 0; 248 while (id < threadContexts.size() && threadContexts[id]) 249 id++; |
250 } 251 |
252 if (threadContexts.size() <= id) 253 threadContexts.resize(id + 1); |
254 |
255 fatal_if(threadContexts[id], 256 "Cannot have two CPUs with the same id (%d)\n", id); 257 |
258 threadContexts[id] = tc; 259 _numContexts++; 260 261#if THE_ISA != NULL_ISA 262 int port = getRemoteGDBPort(); 263 if (port) { 264 RemoteGDB *rgdb = new RemoteGDB(this, tc); 265 GDBListener *gdbl = new GDBListener(rgdb, port + id); --- 270 unchanged lines hidden --- |