Added TargetMemoryAddress, TargetMemorySize, TargetProgramCounter and TargetStackPointer aliases

This commit is contained in:
Nav
2022-09-06 17:16:49 +01:00
parent 620e6dc06a
commit 46d8ce1854
46 changed files with 234 additions and 174 deletions

View File

@@ -16,7 +16,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
: CommandPacket(rawPacket)
{
if (this->data.size() > 1) {
this->fromProgramCounter = static_cast<std::uint32_t>(
this->fromProgramCounter = static_cast<Targets::TargetProgramCounter>(
std::stoi(std::string(this->data.begin(), this->data.end()), nullptr, 16)
);
}

View File

@@ -5,6 +5,8 @@
#include "CommandPacket.hpp"
#include "src/Targets/TargetMemory.hpp"
namespace Bloom::DebugServer::Gdb::CommandPackets
{
/**
@@ -22,7 +24,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
*
* Although the packet *can* contain this address, it is not required, hence the std::optional type.
*/
std::optional<std::uint32_t> fromProgramCounter;
std::optional<Targets::TargetProgramCounter> fromProgramCounter;
explicit ContinueExecution(const RawPacketType& rawPacket);

View File

@@ -7,6 +7,8 @@
#include "CommandPacket.hpp"
#include "src/DebugServer/Gdb/BreakpointType.hpp"
#include "src/Targets/TargetMemory.hpp"
namespace Bloom::DebugServer::Gdb::CommandPackets
{
/**
@@ -24,7 +26,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
/**
* Address at which the breakpoint should be located.
*/
std::uint32_t address = 0;
Targets::TargetMemoryAddress address = 0;
explicit RemoveBreakpoint(const RawPacketType& rawPacket);

View File

@@ -7,6 +7,8 @@
#include "CommandPacket.hpp"
#include "src/DebugServer/Gdb/BreakpointType.hpp"
#include "src/Targets/TargetMemory.hpp"
namespace Bloom::DebugServer::Gdb::CommandPackets
{
/**
@@ -24,7 +26,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
/**
* Address at which the breakpoint should be located.
*/
std::uint32_t address = 0;
Targets::TargetMemoryAddress address = 0;
explicit SetBreakpoint(const RawPacketType& rawPacket);

View File

@@ -17,7 +17,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
: CommandPacket(rawPacket)
{
if (this->data.size() > 1) {
this->fromProgramCounter = static_cast<std::uint32_t>(
this->fromProgramCounter = static_cast<Targets::TargetProgramCounter>(
std::stoi(std::string(this->data.begin(), this->data.end()), nullptr, 16)
);
}

View File

@@ -5,6 +5,8 @@
#include "CommandPacket.hpp"
#include "src/Targets/TargetMemory.hpp"
namespace Bloom::DebugServer::Gdb::CommandPackets
{
/**
@@ -17,7 +19,7 @@ namespace Bloom::DebugServer::Gdb::CommandPackets
/**
* The address from which to begin the step.
*/
std::optional<std::size_t> fromProgramCounter;
std::optional<Targets::TargetProgramCounter> fromProgramCounter;
explicit StepExecution(const RawPacketType& rawPacket);