From 248c51acc8067aa0bf7c3fc4567e80ffa3bc614b Mon Sep 17 00:00:00 2001 From: Nav Date: Mon, 7 Oct 2024 20:02:39 +0100 Subject: [PATCH] Renamed `RiscVDebugInterface::clearAllBreakpoints()` in preparation for separating HW breakpoints from SW breakpoints. --- .../Protocols/RiscVDebugSpec/DebugTranslator.cpp | 4 ++-- .../Protocols/RiscVDebugSpec/DebugTranslator.hpp | 2 +- .../TargetInterfaces/RiscV/RiscVDebugInterface.hpp | 2 +- src/Targets/RiscV/RiscV.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/DebugToolDrivers/Protocols/RiscVDebugSpec/DebugTranslator.cpp b/src/DebugToolDrivers/Protocols/RiscVDebugSpec/DebugTranslator.cpp index 361cdf52..cb12d440 100644 --- a/src/DebugToolDrivers/Protocols/RiscVDebugSpec/DebugTranslator.cpp +++ b/src/DebugToolDrivers/Protocols/RiscVDebugSpec/DebugTranslator.cpp @@ -103,7 +103,7 @@ namespace DebugToolDrivers::Protocols::RiscVDebugSpec if (!this->triggerDescriptorsByIndex.empty()) { // Clear any left-over triggers from the previous debug session - this->clearAllBreakpoints(); + this->clearAllHardwareBreakpoints(); } auto debugControlStatusRegister = this->readDebugControlStatusRegister(); @@ -300,7 +300,7 @@ namespace DebugToolDrivers::Protocols::RiscVDebugSpec this->allocatedTriggerIndices.erase(triggerDescriptor.index); } - void DebugTranslator::clearAllBreakpoints() { + void DebugTranslator::clearAllHardwareBreakpoints() { // To ensure that any untracked breakpoints are cleared, we clear all triggers on the target. for (const auto [triggerIndex, triggerDescriptor] : this->triggerDescriptorsByIndex) { this->clearTrigger(triggerDescriptor); diff --git a/src/DebugToolDrivers/Protocols/RiscVDebugSpec/DebugTranslator.hpp b/src/DebugToolDrivers/Protocols/RiscVDebugSpec/DebugTranslator.hpp index a377d765..75f5aacb 100644 --- a/src/DebugToolDrivers/Protocols/RiscVDebugSpec/DebugTranslator.hpp +++ b/src/DebugToolDrivers/Protocols/RiscVDebugSpec/DebugTranslator.hpp @@ -66,7 +66,7 @@ namespace DebugToolDrivers::Protocols::RiscVDebugSpec std::uint16_t getHardwareBreakpointCount() override; void setHardwareBreakpoint(Targets::TargetMemoryAddress address) override; void clearHardwareBreakpoint(Targets::TargetMemoryAddress address) override; - void clearAllBreakpoints() override; + void clearAllHardwareBreakpoints() override; Targets::TargetRegisterDescriptorAndValuePairs readCpuRegisters( const Targets::TargetRegisterDescriptors& descriptors diff --git a/src/DebugToolDrivers/TargetInterfaces/RiscV/RiscVDebugInterface.hpp b/src/DebugToolDrivers/TargetInterfaces/RiscV/RiscVDebugInterface.hpp index 3c5bc6a3..2a4e8a7c 100644 --- a/src/DebugToolDrivers/TargetInterfaces/RiscV/RiscVDebugInterface.hpp +++ b/src/DebugToolDrivers/TargetInterfaces/RiscV/RiscVDebugInterface.hpp @@ -34,7 +34,7 @@ namespace DebugToolDrivers::TargetInterfaces::RiscV virtual std::uint16_t getHardwareBreakpointCount() = 0; virtual void setHardwareBreakpoint(Targets::TargetMemoryAddress address) = 0; virtual void clearHardwareBreakpoint(Targets::TargetMemoryAddress address) = 0; - virtual void clearAllBreakpoints() = 0; + virtual void clearAllHardwareBreakpoints() = 0; virtual Targets::TargetRegisterDescriptorAndValuePairs readCpuRegisters( const Targets::TargetRegisterDescriptors& descriptors diff --git a/src/Targets/RiscV/RiscV.cpp b/src/Targets/RiscV/RiscV.cpp index d9f2d76b..f0253795 100644 --- a/src/Targets/RiscV/RiscV.cpp +++ b/src/Targets/RiscV/RiscV.cpp @@ -150,7 +150,7 @@ namespace Targets::RiscV } void RiscV::clearAllBreakpoints() { - this->riscVDebugInterface->clearAllBreakpoints(); + this->riscVDebugInterface->clearAllHardwareBreakpoints(); } TargetRegisterDescriptorAndValuePairs RiscV::readRegisters(const TargetRegisterDescriptors& descriptors) {