Replaced SetProgramCounterOnTarget event with TC command
This commit is contained in:
@@ -19,5 +19,6 @@ namespace Bloom::TargetController::Commands
|
||||
WRITE_TARGET_MEMORY,
|
||||
SET_BREAKPOINT,
|
||||
REMOVE_BREAKPOINT,
|
||||
SET_PROGRAM_COUNTER,
|
||||
};
|
||||
}
|
||||
|
||||
32
src/TargetController/Commands/SetProgramCounter.hpp
Normal file
32
src/TargetController/Commands/SetProgramCounter.hpp
Normal 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;
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user