diff --git a/Core/Debugger/WebSocket.cpp b/Core/Debugger/WebSocket.cpp index 4270e402de..cd2199934c 100644 --- a/Core/Debugger/WebSocket.cpp +++ b/Core/Debugger/WebSocket.cpp @@ -181,7 +181,7 @@ void HandleDebuggerRequest(const http::ServerRequest &request) { } }); ws->SetBinaryHandler([&](const std::vector &d) { - ws->Send(DebuggerErrorEvent("Bad message", LogLevel::LERROR)); + ws->Send(DebuggerErrorEvent("Bad message: binary WebSocket frames are not supported", LogLevel::LERROR)); }); while (ws->Process(highActivity ? 1.0f / 1000.0f : 1.0f / 60.0f)) { diff --git a/Core/Debugger/WebSocket/BreakpointSubscriber.cpp b/Core/Debugger/WebSocket/BreakpointSubscriber.cpp index f5d75f4023..7eee0695bc 100644 --- a/Core/Debugger/WebSocket/BreakpointSubscriber.cpp +++ b/Core/Debugger/WebSocket/BreakpointSubscriber.cpp @@ -192,7 +192,7 @@ void WebSocketCPUBreakpointRemove(DebuggerRequest &req) { // - breakpoints: array of objects, each with properties: // - address: unsigned integer address of instruction to break at. // - enabled: boolean, whether to actually enter stepping when this breakpoint trips. -// - log: optional boolean, whether to log when this breakpoint trips. +// - log: boolean, whether to log when this breakpoint trips. // - condition: null, or string expression to evaluate - breakpoint does not trip if false. // - logFormat: null, or string to log when breakpoint trips, may include {expression} parts. // - symbol: null, or string label or symbol at breakpoint address. diff --git a/Core/Debugger/WebSocket/CPUCoreSubscriber.cpp b/Core/Debugger/WebSocket/CPUCoreSubscriber.cpp index fda0721628..323117f423 100644 --- a/Core/Debugger/WebSocket/CPUCoreSubscriber.cpp +++ b/Core/Debugger/WebSocket/CPUCoreSubscriber.cpp @@ -387,7 +387,7 @@ void WebSocketCPUSetReg(DebuggerRequest &req) { // - expression: string containing labels, operators, regs, etc. // // Response (same event name): -// - uintValue: value in register. +// - uintValue: the computed value. // - floatValue: string showing float representation. May be "nan", "inf", or "-inf". void WebSocketCPUEvaluate(DebuggerRequest &req) { if (!currentDebugMIPS->isAlive()) { diff --git a/Core/Debugger/WebSocket/GPUBufferSubscriber.cpp b/Core/Debugger/WebSocket/GPUBufferSubscriber.cpp index 25683d18b8..ce53edda9d 100644 --- a/Core/Debugger/WebSocket/GPUBufferSubscriber.cpp +++ b/Core/Debugger/WebSocket/GPUBufferSubscriber.cpp @@ -262,12 +262,14 @@ static void GenericStreamBuffer(DebuggerRequest &req, std::function frameTimes[0] and sleepTimes[0] could lead to a crash stats.frameTimes.resize(valid); stats.sleepTimes.resize(valid); memcpy(&stats.frameTimes[0], history, sizeof(double) * valid); @@ -149,6 +150,7 @@ void WebSocketGPUStatsState::FlipListener() { // // Note: stats are returned after the next flip completes (paused if CPU or GPU in break.) // Note: info and timing may not be accurate if certain settings are disabled. +// Note: sending this event with no ticket will not trigger a response! (TODO: maybe fix this?) void WebSocketGPUStatsState::Get(DebuggerRequest &req) { if (PSP_GetBootState() != BootState::Complete) return req.Fail("CPU not started"); diff --git a/Core/Debugger/WebSocket/HLESubscriber.cpp b/Core/Debugger/WebSocket/HLESubscriber.cpp index 9f6d28bfa3..f03f114206 100644 --- a/Core/Debugger/WebSocket/HLESubscriber.cpp +++ b/Core/Debugger/WebSocket/HLESubscriber.cpp @@ -180,7 +180,7 @@ void WebSocketHLEThreadStop(DebuggerRequest &req) { break; default: - return req.Fail("Cannot force run thread based on current status"); + return req.Fail("Cannot force stop thread based on current status"); } // Get it again to verify. diff --git a/Core/Debugger/WebSocket/MemoryInfoSubscriber.cpp b/Core/Debugger/WebSocket/MemoryInfoSubscriber.cpp index 139b9124ec..a908f62bfd 100644 --- a/Core/Debugger/WebSocket/MemoryInfoSubscriber.cpp +++ b/Core/Debugger/WebSocket/MemoryInfoSubscriber.cpp @@ -73,8 +73,6 @@ void WebSocketMemoryInfoState::UpdateOverride(bool flag) { // - name: string, friendly name. // - address: number, start address of range. // - size: number, in bytes. -// -// Note: Even if you set false, may stay enabled if set by user or another debug session. void WebSocketMemoryInfoState::Mapping(DebuggerRequest &req) { struct MemRange { const char *type; diff --git a/Core/Debugger/WebSocket/SteppingBroadcaster.cpp b/Core/Debugger/WebSocket/SteppingBroadcaster.cpp index ec36d0378f..32176425b0 100644 --- a/Core/Debugger/WebSocket/SteppingBroadcaster.cpp +++ b/Core/Debugger/WebSocket/SteppingBroadcaster.cpp @@ -50,8 +50,8 @@ private: // Sent unexpectedly with these properties: // - pc: number value of PC register (inaccurate unless stepping.) // - ticks: number of CPU cycles into emulation. -// - reason: a value submitted to Core_EnableStepping ("jit.branchdebug", "savestate.load", "ui.lost_focus", etc.) -// - relatedAddress: an address (often zero, but it can be a value of PC saved at some point, a related memory address, etc.) +// - reason: an optional property, if present, it's equal to the value submitted to Core_EnableStepping ("jit.branchdebug", "savestate.load", "ui.lost_focus", etc.) +// - relatedAddress: an optional address (often zero, but it can be a value of PC saved at some point, a related memory address, etc.), always present if 'reason' is present // CPU has resumed from stepping (cpu.resume) //