Replaced WriteMemoryToTarget event with TC command

This commit is contained in:
Nav
2022-04-30 01:30:57 +01:00
parent 63dc84aba0
commit ffc27a567b
8 changed files with 102 additions and 115 deletions

View File

@@ -28,7 +28,6 @@ namespace Bloom::Events
REGISTERS_WRITTEN_TO_TARGET,
TARGET_EXECUTION_RESUMED,
TARGET_EXECUTION_STOPPED,
WRITE_MEMORY_TO_TARGET,
MEMORY_WRITTEN_TO_TARGET,
SET_BREAKPOINT_ON_TARGET,
REMOVE_BREAKPOINT_ON_TARGET,

View File

@@ -15,7 +15,6 @@
#include "RegistersWrittenToTarget.hpp"
#include "TargetExecutionResumed.hpp"
#include "TargetExecutionStopped.hpp"
#include "WriteMemoryToTarget.hpp"
#include "MemoryWrittenToTarget.hpp"
#include "SetBreakpointOnTarget.hpp"
#include "RemoveBreakpointOnTarget.hpp"

View File

@@ -1,39 +0,0 @@
#pragma once
#include <cstdint>
#include <string>
#include <utility>
#include "Event.hpp"
#include "MemoryWrittenToTarget.hpp"
#include "src/Targets/TargetMemory.hpp"
namespace Bloom::Events
{
class WriteMemoryToTarget: public Event
{
public:
using TargetControllerResponseType = MemoryWrittenToTarget;
static constexpr EventType type = EventType::WRITE_MEMORY_TO_TARGET;
static inline const std::string name = "WriteMemoryToTarget";
Targets::TargetMemoryType memoryType = Targets::TargetMemoryType::RAM;
std::uint32_t startAddress = 0;
Targets::TargetMemoryBuffer buffer;
WriteMemoryToTarget() = default;
WriteMemoryToTarget(
Targets::TargetMemoryType memoryType,
std::uint32_t startAddress,
Targets::TargetMemoryBuffer buffer
): memoryType(memoryType), startAddress(startAddress), buffer(std::move(buffer)) {};
[[nodiscard]] EventType getType() const override {
return WriteMemoryToTarget::type;
}
[[nodiscard]] std::string getName() const override {
return WriteMemoryToTarget::name;
}
};
}