MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / DLDebugHandler

Function DLDebugHandler

Source/SysOSX/HLEGraphics/DisplayListDebugger.cpp:337–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335}
336
337static void DLDebugHandler(void * arg, WebDebugConnection * connection)
338{
339 const WebDebugConnection::QueryParams & params = connection->GetQueryParams();
340 if (!params.empty())
341 {
342 bool ok = false;
343
344 for (size_t i = 0; i < params.size(); ++i)
345 {
346 if (params[i].Key == "action")
347 {
348 if (params[i].Value == "break")
349 {
350 DoTask(connection, kBreakExecution);
351 return;
352 }
353 else if (params[i].Value == "resume")
354 {
355 DoTask(connection, kResumeExecution);
356 return;
357 }
358 }
359 else if (params[i].Key == "scrub")
360 {
361 gInstructionCountLimit = ParseU32(params[i].Value, 10);
362 DoTask(connection, kTaskScrub);
363 return;
364 }
365 else if (params[i].Key == "screen")
366 {
367 //int cmd = atoi(params[i].Value);
368 DoTask(connection, kTaskTakeScreenshot);
369 return;
370 }
371 else if (params[i].Key == "dump")
372 {
373 //int cmd = atoi(params[i].Value);
374 DoTask(connection, kTaskDumpDList);
375 return;
376 }
377 }
378
379 // Fallthrough for handlers that just return 'ok'.
380 connection->BeginResponse(ok ? 200 : 400, -1, kTextPlain);
381 connection->WriteString(ok ? "ok\n" : "fail\n");
382 connection->EndResponse();
383 return;
384 }
385
386 if (!ServeResource(connection, "/html/dldebugger.html"))
387 {
388 Generate500(connection, "Couldn't load html/debugger.html");
389 }
390}
391
392bool DLDebugger_RegisterWebDebug()
393{

Callers

nothing calls this directly

Calls 9

DoTaskFunction · 0.85
ParseU32Function · 0.85
ServeResourceFunction · 0.85
Generate500Function · 0.85
emptyMethod · 0.80
sizeMethod · 0.80
BeginResponseMethod · 0.80
WriteStringMethod · 0.80
EndResponseMethod · 0.80

Tested by

no test coverage detected