WCH RISC-V software breakpoints, and a few other bits of refactoring/tidying

This commit is contained in:
Nav
2024-12-05 23:09:01 +00:00
parent 966244a01a
commit 33ed399337
55 changed files with 1530 additions and 686 deletions

View File

@@ -59,8 +59,6 @@ namespace Targets::RiscV
this->stop();
}
this->clearAllBreakpoints();
this->run();
this->riscVDebugInterface->deactivate();
}
@@ -80,26 +78,6 @@ namespace Targets::RiscV
this->riscVDebugInterface->reset();
}
void RiscV::setSoftwareBreakpoint(TargetMemoryAddress address) {
throw Exceptions::Exception{"TARGET - SW breakpoints not supported"};
}
void RiscV::removeSoftwareBreakpoint(TargetMemoryAddress address) {
throw Exceptions::Exception{"TARGET - SW breakpoints not supported"};
}
void RiscV::setHardwareBreakpoint(TargetMemoryAddress address) {
this->riscVDebugInterface->setHardwareBreakpoint(address);
}
void RiscV::removeHardwareBreakpoint(TargetMemoryAddress address) {
this->riscVDebugInterface->clearHardwareBreakpoint(address);
}
void RiscV::clearAllBreakpoints() {
this->riscVDebugInterface->clearAllHardwareBreakpoints();
}
TargetRegisterDescriptorAndValuePairs RiscV::readRegisters(const TargetRegisterDescriptors& descriptors) {
auto output = TargetRegisterDescriptorAndValuePairs{};
@@ -316,10 +294,12 @@ namespace Targets::RiscV
}
void RiscV::enableProgrammingMode() {
this->riscVDebugInterface->enableProgrammingMode();
this->programmingMode = true;
}
void RiscV::disableProgrammingMode() {
this->riscVDebugInterface->disableProgrammingMode();
this->programmingMode = false;
}