Replaced SetBreakpointOnTarget event with TC command

This commit is contained in:
Nav
2022-04-30 22:03:28 +01:00
parent 226b663aea
commit f7619f475b
9 changed files with 48 additions and 85 deletions

View File

@@ -17,5 +17,6 @@ namespace Bloom::TargetController::Commands
GET_TARGET_STATE,
STEP_TARGET_EXECUTION,
WRITE_TARGET_MEMORY,
SET_BREAKPOINT,
};
}

View File

@@ -0,0 +1,30 @@
#pragma once
#include "Command.hpp"
#include "src/Targets/TargetBreakpoint.hpp"
namespace Bloom::TargetController::Commands
{
class SetBreakpoint: public Command
{
public:
static constexpr CommandType type = CommandType::SET_BREAKPOINT;
static inline const std::string name = "SetBreakpoint";
Targets::TargetBreakpoint breakpoint;
SetBreakpoint() = default;
explicit SetBreakpoint(const Targets::TargetBreakpoint& breakpoint)
: breakpoint(breakpoint)
{};
[[nodiscard]] CommandType getType() const override {
return SetBreakpoint::type;
}
[[nodiscard]] bool requiresStoppedTargetState() const override {
return true;
}
};
}