Removed TargetProgramCounter type alias

This commit is contained in:
Nav
2023-09-21 00:40:30 +01:00
parent 611ad70d6b
commit b5df37ae9b
27 changed files with 46 additions and 49 deletions

View File

@@ -142,7 +142,7 @@ namespace DebugServer::Gdb::AvrGdb
};
}
void AvrGdbRsp::handleTargetStoppedGdbResponse(Targets::TargetProgramCounter programAddress) {
void AvrGdbRsp::handleTargetStoppedGdbResponse(Targets::TargetMemoryAddress programAddress) {
using Services::StringService;
Logger::debug("Target stopped at byte address: 0x" + StringService::toHex(programAddress));

View File

@@ -45,7 +45,7 @@ namespace DebugServer::Gdb::AvrGdb
*/
std::set<std::pair<Feature, std::optional<std::string>>> getSupportedFeatures();
void handleTargetStoppedGdbResponse(Targets::TargetProgramCounter programAddress) override;
void handleTargetStoppedGdbResponse(Targets::TargetMemoryAddress programAddress) override;
private:
TargetDescriptor gdbTargetDescriptor;

View File

@@ -46,7 +46,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets
}
Targets::TargetRegisters registerSet;
Targets::TargetProgramCounter programCounter;
Targets::TargetMemoryAddress programCounter;
{
const auto atomicSession = targetControllerService.makeAtomicSession();

View File

@@ -45,8 +45,8 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets
: commandData.end()
);
this->startAddress = static_cast<Targets::TargetProgramCounter>(std::stoi(startAddressHex, nullptr, 16));
this->endAddress = static_cast<Targets::TargetProgramCounter>(std::stoi(endAddressHex, nullptr, 16));
this->startAddress = static_cast<Targets::TargetMemoryAddress>(std::stoi(startAddressHex, nullptr, 16));
this->endAddress = static_cast<Targets::TargetMemoryAddress>(std::stoi(endAddressHex, nullptr, 16));
}
void VContRangeStep::handle(Gdb::DebugSession& debugSession, TargetControllerService& targetControllerService) {

View File

@@ -16,8 +16,8 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets
class VContRangeStep: public Gdb::CommandPackets::CommandPacket
{
public:
Targets::TargetProgramCounter startAddress;
Targets::TargetProgramCounter endAddress;
Targets::TargetMemoryAddress startAddress;
Targets::TargetMemoryAddress endAddress;
explicit VContRangeStep(const RawPacket& rawPacket);

View File

@@ -52,7 +52,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets
try {
if (this->registerId == TargetDescriptor::PROGRAM_COUNTER_GDB_REGISTER_ID) {
targetControllerService.setProgramCounter(
static_cast<Targets::TargetProgramCounter>(
static_cast<Targets::TargetMemoryAddress>(
(this->registerValue.size() >= 1 ? this->registerValue[0] : 0x00) << 24
| (this->registerValue.size() >= 2 ? this->registerValue[1] : 0x00) << 16
| (this->registerValue.size() >= 3 ? this->registerValue[2] : 0x00) << 8

View File

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

View File

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

View File

@@ -370,7 +370,7 @@ namespace DebugServer::Gdb
}
}
void GdbRspDebugServer::handleTargetStoppedGdbResponse(Targets::TargetProgramCounter programAddress) {
void GdbRspDebugServer::handleTargetStoppedGdbResponse(Targets::TargetMemoryAddress programAddress) {
auto* debugSession = this->getActiveDebugSession();
if (debugSession->activeRangeSteppingSession.has_value()) {

View File

@@ -199,7 +199,7 @@ namespace DebugServer::Gdb
*/
void onTargetExecutionResumed(const Events::TargetExecutionResumed&);
virtual void handleTargetStoppedGdbResponse(Targets::TargetProgramCounter programAddress);
virtual void handleTargetStoppedGdbResponse(Targets::TargetMemoryAddress programAddress);
virtual void handleTargetResumedGdbResponse();
};
}