MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / HandleInspectVariable

Method HandleInspectVariable

neo/tools/debugger/DebuggerServer.cpp:489–522  ·  view source on GitHub ↗

================ rvDebuggerServer::HandleInspectVariable Respondes to a request from the debugger client to inspect the value of a given variable ================ */

Source from the content-addressed store, hash-verified

487================
488*/
489void 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================

Callers

nothing calls this directly

Calls 9

BeginWritingMethod · 0.80
ReadShortMethod · 0.45
ReadStringMethod · 0.45
InitMethod · 0.45
WriteShortMethod · 0.45
GetRegisterValueMethod · 0.45
WriteStringMethod · 0.45
GetDataMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected