WCH RISC-V software breakpoints, and a few other bits of refactoring/tidying
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
}
|
||||
24
src/TargetController/Responses/ProgramBreakpoint.hpp
Normal file
24
src/TargetController/Responses/ProgramBreakpoint.hpp
Normal 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;
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -16,6 +16,6 @@ namespace TargetController::Responses
|
||||
TARGET_GPIO_PAD_STATES,
|
||||
TARGET_STACK_POINTER,
|
||||
TARGET_PROGRAM_COUNTER,
|
||||
BREAKPOINT,
|
||||
PROGRAM_BREAKPOINT,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user