diff options
author | Oxore <oxore@protonmail.com> | 2022-09-03 17:33:07 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2022-09-03 17:33:07 +0300 |
commit | d2b615061e008c4d13a6ce0f11efd8ec337f41c6 (patch) | |
tree | 0aab1cc72db576761524267ea3594a21db14b829 /gdbremote_parser.hpp | |
parent | 9037b017d6519fed435eea20c3553d40d871d379 (diff) |
Impl breakpoints (pretty much draft)
Breakpoints work somehow, but overstep 1 instruction. Needs to be fixed.
Diffstat (limited to 'gdbremote_parser.hpp')
-rw-r--r-- | gdbremote_parser.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdbremote_parser.hpp b/gdbremote_parser.hpp index e060daa..370e8cc 100644 --- a/gdbremote_parser.hpp +++ b/gdbremote_parser.hpp @@ -94,6 +94,24 @@ struct PacketDataWriteMemory: public PacketData { virtual ~PacketDataWriteMemory() {} }; +enum class BreakpointType: uint32_t { + kMin = 0, + kSoftwareBreakpoint = 0, + kHardwareBreakpoint = 1, + kWriteWatchpoint = 2, + kReadWatchpoint = 3, + kAccessWatchpoint = 4, + kUnsupported // Keep it last and unassigned +}; + +struct PacketDataBreakpoint: public PacketData { + PacketDataBreakpoint(BreakpointType a_type, uint32_t a_offset, uint32_t a_length) + : type(a_type), offset(a_offset), length(a_length) {} + BreakpointType type{}; + uint32_t offset{}, length{}; + virtual ~PacketDataBreakpoint() {} +}; + struct Packet { const PacketType type{}; const std::unique_ptr<const PacketData> data{nullptr}; |