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

Method ProcessMessages

neo/tools/debugger/DebuggerClient.cpp:110–191  ·  view source on GitHub ↗

================ rvDebuggerClient::ProcessMessages Process all incomding messages from the debugger server ================ */

Source from the content-addressed store, hash-verified

108================
109*/
110bool rvDebuggerClient::ProcessMessages ( void )
111{
112 netadr_t adrFrom;
113 idBitMsg msg;
114 byte buffer[MAX_MSGLEN];
115
116 msg.SetSize(MAX_MSGLEN);
117 msg.BeginReading();
118
119 int msgSize;
120 // Check for pending udp packets on the debugger port
121 while ( mPort.GetPacket ( adrFrom, buffer,msgSize, MAX_MSGLEN) )
122 {
123 short command;
124 msg.Init(buffer, sizeof(buffer));
125 msg.SetSize(msgSize);
126 msg.BeginReading();
127
128 // Only accept packets from the debugger server for security reasons
129 if ( !Sys_CompareNetAdrBase ( adrFrom, mServerAdr ) )
130 {
131 continue;
132 }
133 command = msg.ReadShort ( );
134
135 // Is this what we are waiting for?
136 if ( command == mWaitFor )
137 {
138 mWaitFor = DBMSG_UNKNOWN;
139 }
140
141 switch ( command )
142 {
143 case DBMSG_CONNECT:
144 mConnected = true;
145 SendMessage ( DBMSG_CONNECTED );
146 SendBreakpoints ( );
147 break;
148
149 case DBMSG_CONNECTED:
150 mConnected = true;
151 SendBreakpoints ( );
152 break;
153
154 case DBMSG_DISCONNECT:
155 mConnected = false;
156 break;
157
158 case DBMSG_BREAK:
159 HandleBreak ( &msg );
160 break;
161
162 // Callstack being send to the client
163 case DBMSG_INSPECTCALLSTACK:
164 HandleInspectCallstack ( &msg );
165 break;
166
167 // Thread list is being sent to the client

Callers 2

RunMethod · 0.45
DebuggerServerThreadFunction · 0.45

Calls 10

BeginReadingMethod · 0.80
SetReadCountMethod · 0.80
SetReadBitMethod · 0.80
ProcessNetMessageMethod · 0.80
Sys_CompareNetAdrBaseFunction · 0.50
SetSizeMethod · 0.45
GetPacketMethod · 0.45
InitMethod · 0.45
ReadShortMethod · 0.45
GetWindowMethod · 0.45

Tested by

no test coverage detected