WCH RISC-V software breakpoints, and a few other bits of refactoring/tidying

This commit is contained in:
Nav
2024-12-05 23:09:01 +00:00
parent 966244a01a
commit 33ed399337
55 changed files with 1530 additions and 686 deletions

View File

@@ -1,24 +0,0 @@
#pragma once
#include "Response.hpp"
#include "src/Targets/TargetBreakpoint.hpp"
namespace TargetController::Responses
{
class Breakpoint: public Response
{
public:
static constexpr ResponseType type = ResponseType::BREAKPOINT;
Targets::TargetBreakpoint breakpoint;
explicit Breakpoint(const Targets::TargetBreakpoint& breakpoint)
: breakpoint(breakpoint)
{}
[[nodiscard]] ResponseType getType() const override {
return Breakpoint::type;
}
};
}

View File

@@ -0,0 +1,24 @@
#pragma once
#include "Response.hpp"
#include "src/Targets/TargetBreakpoint.hpp"
namespace TargetController::Responses
{
class ProgramBreakpoint: public Response
{
public:
static constexpr ResponseType type = ResponseType::PROGRAM_BREAKPOINT;
Targets::TargetProgramBreakpoint breakpoint;
explicit ProgramBreakpoint(const Targets::TargetProgramBreakpoint& breakpoint)
: breakpoint(breakpoint)
{}
[[nodiscard]] ResponseType getType() const override {
return ProgramBreakpoint::type;
}
};
}

View File

@@ -16,6 +16,6 @@ namespace TargetController::Responses
TARGET_GPIO_PAD_STATES,
TARGET_STACK_POINTER,
TARGET_PROGRAM_COUNTER,
BREAKPOINT,
PROGRAM_BREAKPOINT,
};
}