================ rvDebuggerServer::HandleInspectThreads Send the list of the current threads in the interpreter back to the debugger client ================ */
| 417 | ================ |
| 418 | */ |
| 419 | void rvDebuggerServer::HandleInspectThreads ( idBitMsg* msg ) |
| 420 | { |
| 421 | idBitMsg msgOut; |
| 422 | byte buffer[MAX_MSGLEN]; |
| 423 | int i; |
| 424 | |
| 425 | // Initialize the message |
| 426 | msgOut.Init( buffer, sizeof( buffer ) ); |
| 427 | msgOut.SetAllowOverflow(true); |
| 428 | msgOut.BeginWriting(); |
| 429 | msgOut.WriteShort ( (short)DBMSG_INSPECTTHREADS ); |
| 430 | |
| 431 | // Write the number of threads to the message |
| 432 | msgOut.WriteShort ((short)((idGameEditExt*) gameEdit)->GetTotalScriptThreads() ); |
| 433 | |
| 434 | // Loop through all of the threads and write their name and number to the message |
| 435 | for ( i = 0; i < ((idGameEditExt*) gameEdit)->GetTotalScriptThreads(); i ++ ) |
| 436 | { |
| 437 | ((idGameEditExt*) gameEdit)->MSG_WriteThreadInfo(&msgOut,((idGameEditExt*) gameEdit)->GetThreadByIndex(i), mBreakInterpreter); |
| 438 | } |
| 439 | |
| 440 | // Send off the inspect threads packet to the debugger client |
| 441 | SendPacket (msgOut.GetData(), msgOut.GetSize() ); |
| 442 | } |
| 443 | |
| 444 | /* |
| 445 | ================ |
nothing calls this directly
no test coverage detected