From d2b615061e008c4d13a6ce0f11efd8ec337f41c6 Mon Sep 17 00:00:00 2001 From: Oxore Date: Sat, 3 Sep 2022 17:33:07 +0300 Subject: Impl breakpoints (pretty much draft) Breakpoints work somehow, but overstep 1 instruction. Needs to be fixed. --- m68k_debugging.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'm68k_debugging.hpp') diff --git a/m68k_debugging.hpp b/m68k_debugging.hpp index d1acce8..1aa3bfc 100644 --- a/m68k_debugging.hpp +++ b/m68k_debugging.hpp @@ -3,6 +3,8 @@ #pragma once +#include "gdbremote_parser.hpp" + #include #include @@ -41,6 +43,8 @@ struct M68KCPUState { class M68KDebuggingControl { public: + using BreakpointType = GDBRemote::BreakpointType; + M68KDebuggingControl() = default; M68KDebuggingControl(M68KDebuggingControl&&) = delete; M68KDebuggingControl(const M68KDebuggingControl&) = delete; @@ -59,7 +63,13 @@ public: void Write8(uint32_t address, uint8_t value); void Write16(uint32_t address, uint16_t value); void Write32(uint32_t address, uint32_t value); + void SetBreakpoint(BreakpointType type, uint32_t address, uint32_t length); + void RemoveBreakpoint(BreakpointType type, uint32_t address, uint32_t length); + void RaiseBreakpoint() { _have_break_risen = true; } + bool HasBreakpoint() const { return _have_break_risen; } + void ResetPendingBreakpoint() { _have_break_risen = false; } private: bool _is_running{}; + bool _have_break_risen{}; }; -- cgit v1.2.3