summaryrefslogtreecommitdiff
path: root/m68k_debugging.hpp
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2022-09-03 17:33:07 +0300
committerOxore <oxore@protonmail.com>2022-09-03 17:33:07 +0300
commitd2b615061e008c4d13a6ce0f11efd8ec337f41c6 (patch)
tree0aab1cc72db576761524267ea3594a21db14b829 /m68k_debugging.hpp
parent9037b017d6519fed435eea20c3553d40d871d379 (diff)
Impl breakpoints (pretty much draft)
Breakpoints work somehow, but overstep 1 instruction. Needs to be fixed.
Diffstat (limited to 'm68k_debugging.hpp')
-rw-r--r--m68k_debugging.hpp10
1 files changed, 10 insertions, 0 deletions
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 <cstdint>
#include <cstddef>
@@ -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{};
};