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

@@ -81,7 +81,6 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
using Targets::TargetMemoryBuffer;
using Targets::TargetMemoryAddress;
using Targets::TargetMemorySize;
using Targets::TargetProgramCounter;
using Targets::TargetRegister;
using Targets::TargetRegisterDescriptor;
using Targets::TargetRegisterDescriptors;
@@ -279,7 +278,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
}
}
TargetProgramCounter EdbgAvr8Interface::getProgramCounter() {
TargetMemoryAddress EdbgAvr8Interface::getProgramCounter() {
if (this->targetState != TargetState::STOPPED) {
this->stop();
}
@@ -295,7 +294,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
return responseFrame.extractProgramCounter();
}
void EdbgAvr8Interface::setProgramCounter(TargetProgramCounter programCounter) {
void EdbgAvr8Interface::setProgramCounter(TargetMemoryAddress programCounter) {
if (this->targetState != TargetState::STOPPED) {
this->stop();
}

View File

@@ -142,7 +142,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
*
* @return
*/
Targets::TargetProgramCounter getProgramCounter() override;
Targets::TargetMemoryAddress getProgramCounter() override;
/**
* Issues the "PC Write" command to the debug tool, setting the program counter on the target.
@@ -150,7 +150,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
* @param programCounter
* The byte address to set as the program counter.
*/
void setProgramCounter(Targets::TargetProgramCounter programCounter) override;
void setProgramCounter(Targets::TargetMemoryAddress programCounter) override;
/**
* Issues the "Get ID" command to the debug tool, to extract the signature from the target.

View File

@@ -17,7 +17,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::Avr8
: Avr8GenericResponseFrame(avrResponses)
{}
Targets::TargetProgramCounter extractProgramCounter() const {
Targets::TargetMemoryAddress extractProgramCounter() const {
/*
* The payload for the PC Read command should always consist of six bytes. Thr first two being the
* command ID and version, the other four being the PC. The four PC bytes are little-endian.
@@ -27,7 +27,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::Avr8
"frame - unexpected payload size.");
}
return static_cast<Targets::TargetProgramCounter>(
return static_cast<Targets::TargetMemoryAddress>(
this->payload[5] << 24 | this->payload[4] << 16 | this->payload[3] << 8 | this->payload[2]
) * 2;
}

View File

@@ -133,14 +133,14 @@ namespace DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8
*
* @return
*/
virtual Targets::TargetProgramCounter getProgramCounter() = 0;
virtual Targets::TargetMemoryAddress getProgramCounter() = 0;
/**
* Should update the program counter value on the target.
*
* @param programCounter
*/
virtual void setProgramCounter(Targets::TargetProgramCounter programCounter) = 0;
virtual void setProgramCounter(Targets::TargetMemoryAddress programCounter) = 0;
/**
* Should read the requested registers from the target.