mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-11 13:36:24 +02:00
Debugger: Refactor to allow simpler broadcasting.
It's okay to mix a bit for simple ones, I think.
This commit is contained in:
1 parent
c10b2035b5
commit
4ce2b64ef7
16 files changed
+46
-51
No files matched your search
@@ -28,11 +28,12 @@
|
||||
#include "Core/MIPS/MIPSAsm.h"
|
||||
#include "Core/MIPS/MIPSDebugInterface.h"
|
||||
|
||||
struct WebSocketDisasmState {
|
||||
class WebSocketDisasmState : public DebuggerSubscriber {
|
||||
public:
|
||||
WebSocketDisasmState() {
|
||||
disasm_.setCpu(currentDebugMIPS);
|
||||
}
|
||||
~WebSocketDisasmState() {
|
||||
~WebSocketDisasmState() override {
|
||||
disasm_.clear();
|
||||
}
|
||||
|
||||
@@ -49,7 +50,7 @@ protected:
|
||||
DisassemblyManager disasm_;
|
||||
};
|
||||
|
||||
void *WebSocketDisasmInit(DebuggerEventHandlerMap &map) {
|
||||
DebuggerSubscriber *WebSocketDisasmInit(DebuggerEventHandlerMap &map) {
|
||||
auto p = new WebSocketDisasmState();
|
||||
map["memory.base"] = std::bind(&WebSocketDisasmState::Base, p, std::placeholders::_1);
|
||||
map["memory.disasm"] = std::bind(&WebSocketDisasmState::Disasm, p, std::placeholders::_1);
|
||||
@@ -59,10 +60,6 @@ void *WebSocketDisasmInit(DebuggerEventHandlerMap &map) {
|
||||
return p;
|
||||
}
|
||||
|
||||
void WebSocketDisasmShutdown(void *p) {
|
||||
delete static_cast<WebSocketDisasmState *>(p);
|
||||
}
|
||||
|
||||
static DebugInterface *CPUFromRequest(DebuggerRequest &req) {
|
||||
if (!req.HasParam("thread"))
|
||||
return currentDebugMIPS;
|
||||
|
||||
Reference in new issue
Block a user