Replaced SetProgramCounterOnTarget event with TC command

This commit is contained in:
Nav
2022-04-30 23:10:07 +01:00
parent acc96fd6d1
commit 7c4e39dd03
10 changed files with 60 additions and 86 deletions

View File

@@ -19,5 +19,6 @@ namespace Bloom::TargetController::Commands
WRITE_TARGET_MEMORY,
SET_BREAKPOINT,
REMOVE_BREAKPOINT,
SET_PROGRAM_COUNTER,
};
}

View File

@@ -0,0 +1,32 @@
#pragma once
#include <cstdint>
#include "Command.hpp"
#include "src/Targets/TargetBreakpoint.hpp"
namespace Bloom::TargetController::Commands
{
class SetProgramCounter: public Command
{
public:
static constexpr CommandType type = CommandType::SET_PROGRAM_COUNTER;
static inline const std::string name = "SetProgramCounter";
std::uint32_t address = 0;
SetProgramCounter() = default;
explicit SetProgramCounter(std::uint32_t address)
: address(address)
{};
[[nodiscard]] CommandType getType() const override {
return SetProgramCounter::type;
}
[[nodiscard]] bool requiresStoppedTargetState() const override {
return true;
}
};
}