mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Debugger: Add cpu.stepping and cpu.resume.
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
|
||||
void *WebSocketCPUCoreInit(DebuggerEventHandlerMap &map) {
|
||||
// No need to bind or alloc state, these are all global.
|
||||
map["cpu.stepping"] = &WebSocketCPUStepping;
|
||||
map["cpu.resume"] = &WebSocketCPUResume;
|
||||
map["cpu.getAllRegs"] = &WebSocketCPUGetAllRegs;
|
||||
map["cpu.getReg"] = &WebSocketCPUGetReg;
|
||||
map["cpu.setReg"] = &WebSocketCPUSetReg;
|
||||
@@ -39,6 +41,36 @@ static std::string RegValueAsFloat(uint32_t u) {
|
||||
return StringFromFormat("%f", bits.f);
|
||||
}
|
||||
|
||||
// Begin stepping and pause the CPU (cpu.stepping)
|
||||
//
|
||||
// No parameters.
|
||||
//
|
||||
// No immediate response. Once CPU is stepping, a "cpu.stepping" event will be sent.
|
||||
void WebSocketCPUStepping(DebuggerRequest &req) {
|
||||
if (!currentDebugMIPS->isAlive()) {
|
||||
return req.Fail("CPU not started");
|
||||
}
|
||||
if (!Core_IsStepping() && Core_IsActive()) {
|
||||
Core_EnableStepping(true);
|
||||
}
|
||||
}
|
||||
|
||||
// Stop stepping and resume the CPU (cpu.resume)
|
||||
//
|
||||
// No parameters.
|
||||
//
|
||||
// No immediate response. Once CPU is stepping, a "cpu.resume" event will be sent.
|
||||
void WebSocketCPUResume(DebuggerRequest &req) {
|
||||
if (!currentDebugMIPS->isAlive()) {
|
||||
return req.Fail("CPU not started");
|
||||
}
|
||||
if (!Core_IsStepping() || coreState == CORE_POWERDOWN) {
|
||||
return req.Fail("CPU not stepping");
|
||||
}
|
||||
|
||||
Core_EnableStepping(false);
|
||||
}
|
||||
|
||||
// Retrieve all regs and their values (cpu.getAllRegs)
|
||||
//
|
||||
// No parameters.
|
||||
|
||||
Reference in New Issue
Block a user