================ rvDebuggerServer::HandleInspectVariable Respondes to a request from the debugger client to inspect the value of a given variable ================ */
| 487 | ================ |
| 488 | */ |
| 489 | void rvDebuggerServer::HandleInspectVariable ( idBitMsg* msg ) |
| 490 | { |
| 491 | char varname[256]; |
| 492 | int scopeDepth; |
| 493 | |
| 494 | if ( !mBreak ) |
| 495 | { |
| 496 | return; |
| 497 | } |
| 498 | |
| 499 | scopeDepth = (short)msg->ReadShort ( ); |
| 500 | msg->ReadString ( varname, 256 ); |
| 501 | |
| 502 | idStr varvalue; |
| 503 | |
| 504 | idBitMsg msgOut; |
| 505 | byte buffer[MAX_MSGLEN]; |
| 506 | |
| 507 | // Initialize the message |
| 508 | msgOut.Init( buffer, sizeof( buffer ) ); |
| 509 | msgOut.BeginWriting(); |
| 510 | msgOut.WriteShort ( (short)DBMSG_INSPECTVARIABLE ); |
| 511 | |
| 512 | if (!((idGameEditExt*) gameEdit)->GetRegisterValue(mBreakInterpreter, varname, varvalue, scopeDepth ) ) |
| 513 | { |
| 514 | varvalue = "???"; |
| 515 | } |
| 516 | |
| 517 | msgOut.WriteShort ( (short)scopeDepth ); |
| 518 | msgOut.WriteString ( varname ); |
| 519 | msgOut.WriteString ( varvalue ); |
| 520 | |
| 521 | SendPacket (msgOut.GetData(), msgOut.GetSize() ); |
| 522 | } |
| 523 | |
| 524 | /* |
| 525 | ================ |
nothing calls this directly
no test coverage detected