WCH RISC-V software breakpoints, and a few other bits of refactoring/tidying
This commit is contained in:
@@ -242,6 +242,8 @@ namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||
|
||||
void EdbgAvr8Interface::deactivate() {
|
||||
if (this->targetAttached) {
|
||||
this->clearAllBreakpoints();
|
||||
|
||||
if (
|
||||
this->session.targetConfig.physicalInterface == TargetPhysicalInterface::DEBUG_WIRE
|
||||
&& this->session.targetConfig.disableDebugWireOnDeactivate
|
||||
@@ -429,15 +431,6 @@ namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||
this->hardwareBreakpointNumbersByAddress.erase(address);
|
||||
}
|
||||
|
||||
void EdbgAvr8Interface::clearAllBreakpoints() {
|
||||
this->clearAllSoftwareBreakpoints();
|
||||
|
||||
// Clear all hardware breakpoints
|
||||
while (!this->hardwareBreakpointNumbersByAddress.empty()) {
|
||||
this->clearHardwareBreakpoint(this->hardwareBreakpointNumbersByAddress.begin()->first);
|
||||
}
|
||||
}
|
||||
|
||||
TargetRegisterDescriptorAndValuePairs EdbgAvr8Interface::readRegisters(
|
||||
const Targets::TargetRegisterDescriptors& descriptors
|
||||
) {
|
||||
@@ -1244,6 +1237,15 @@ namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||
}
|
||||
}
|
||||
|
||||
void EdbgAvr8Interface::clearAllBreakpoints() {
|
||||
this->clearAllSoftwareBreakpoints();
|
||||
|
||||
// Clear all hardware breakpoints
|
||||
while (!this->hardwareBreakpointNumbersByAddress.empty()) {
|
||||
this->clearHardwareBreakpoint(this->hardwareBreakpointNumbersByAddress.begin()->first);
|
||||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<AvrEvent> EdbgAvr8Interface::getAvrEvent() {
|
||||
auto event = this->edbgInterface->requestAvrEvent();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user