From 48a7ae5dd03bc104adf63dea5246c7c2ef5f997a Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 14 Dec 2024 16:17:02 +0000 Subject: [PATCH] Passed target state to GDB command handlers, and removed unnecessary PC read --- .../CommandPackets/AvrGdbCommandPacketInterface.hpp | 2 ++ .../Gdb/AvrGdb/CommandPackets/EepromFill.cpp | 1 + .../Gdb/AvrGdb/CommandPackets/EepromFill.hpp | 1 + .../Gdb/AvrGdb/CommandPackets/FlashDone.cpp | 1 + .../Gdb/AvrGdb/CommandPackets/FlashDone.hpp | 1 + .../Gdb/AvrGdb/CommandPackets/FlashErase.cpp | 1 + .../Gdb/AvrGdb/CommandPackets/FlashErase.hpp | 1 + .../Gdb/AvrGdb/CommandPackets/FlashWrite.cpp | 1 + .../Gdb/AvrGdb/CommandPackets/FlashWrite.hpp | 1 + .../Gdb/AvrGdb/CommandPackets/ReadMemory.cpp | 1 + .../Gdb/AvrGdb/CommandPackets/ReadMemory.hpp | 1 + .../Gdb/AvrGdb/CommandPackets/ReadMemoryMap.cpp | 1 + .../Gdb/AvrGdb/CommandPackets/ReadMemoryMap.hpp | 1 + .../Gdb/AvrGdb/CommandPackets/ReadRegister.cpp | 8 ++------ .../Gdb/AvrGdb/CommandPackets/ReadRegister.hpp | 1 + .../Gdb/AvrGdb/CommandPackets/ReadRegisters.cpp | 3 ++- .../Gdb/AvrGdb/CommandPackets/ReadRegisters.hpp | 1 + .../Gdb/AvrGdb/CommandPackets/RemoveBreakpoint.cpp | 1 + .../Gdb/AvrGdb/CommandPackets/RemoveBreakpoint.hpp | 1 + .../Gdb/AvrGdb/CommandPackets/SetBreakpoint.cpp | 1 + .../Gdb/AvrGdb/CommandPackets/SetBreakpoint.hpp | 1 + .../Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp | 1 + .../Gdb/AvrGdb/CommandPackets/VContRangeStep.hpp | 1 + .../CommandPackets/VContSupportedActionsQuery.cpp | 1 + .../CommandPackets/VContSupportedActionsQuery.hpp | 1 + .../Gdb/AvrGdb/CommandPackets/WriteMemory.cpp | 1 + .../Gdb/AvrGdb/CommandPackets/WriteMemory.hpp | 1 + .../Gdb/AvrGdb/CommandPackets/WriteRegister.cpp | 1 + .../Gdb/AvrGdb/CommandPackets/WriteRegister.hpp | 1 + src/DebugServer/Gdb/GdbRspDebugServer.hpp | 5 +++++ .../Gdb/RiscVGdb/CommandPackets/FlashDone.cpp | 1 + .../Gdb/RiscVGdb/CommandPackets/FlashDone.hpp | 1 + .../Gdb/RiscVGdb/CommandPackets/FlashErase.cpp | 1 + .../Gdb/RiscVGdb/CommandPackets/FlashErase.hpp | 1 + .../Gdb/RiscVGdb/CommandPackets/FlashWrite.cpp | 1 + .../Gdb/RiscVGdb/CommandPackets/FlashWrite.hpp | 1 + .../Gdb/RiscVGdb/CommandPackets/ReadMemory.cpp | 1 + .../Gdb/RiscVGdb/CommandPackets/ReadMemory.hpp | 1 + .../Gdb/RiscVGdb/CommandPackets/ReadMemoryMap.cpp | 1 + .../Gdb/RiscVGdb/CommandPackets/ReadMemoryMap.hpp | 1 + .../Gdb/RiscVGdb/CommandPackets/ReadRegister.cpp | 8 ++------ .../Gdb/RiscVGdb/CommandPackets/ReadRegister.hpp | 1 + .../Gdb/RiscVGdb/CommandPackets/ReadRegisters.cpp | 7 +++---- .../Gdb/RiscVGdb/CommandPackets/ReadRegisters.hpp | 1 + .../Gdb/RiscVGdb/CommandPackets/RemoveBreakpoint.cpp | 1 + .../Gdb/RiscVGdb/CommandPackets/RemoveBreakpoint.hpp | 1 + .../CommandPackets/RiscVGdbCommandPacketInterface.hpp | 10 ++-------- .../Gdb/RiscVGdb/CommandPackets/SetBreakpoint.cpp | 1 + .../Gdb/RiscVGdb/CommandPackets/SetBreakpoint.hpp | 1 + .../CommandPackets/VContSupportedActionsQuery.cpp | 1 + .../CommandPackets/VContSupportedActionsQuery.hpp | 1 + .../Gdb/RiscVGdb/CommandPackets/WriteMemory.cpp | 1 + .../Gdb/RiscVGdb/CommandPackets/WriteMemory.hpp | 1 + .../Gdb/RiscVGdb/CommandPackets/WriteRegister.cpp | 1 + .../Gdb/RiscVGdb/CommandPackets/WriteRegister.hpp | 1 + 55 files changed, 66 insertions(+), 25 deletions(-) diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/AvrGdbCommandPacketInterface.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/AvrGdbCommandPacketInterface.hpp index 2b4bd4ca..c94b0557 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/AvrGdbCommandPacketInterface.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/AvrGdbCommandPacketInterface.hpp @@ -4,6 +4,7 @@ #include "src/DebugServer/Gdb/DebugSession.hpp" #include "src/DebugServer/Gdb/AvrGdb/AvrGdbTargetDescriptor.hpp" #include "src/Targets/TargetDescriptor.hpp" +#include "src/Targets/TargetState.hpp" #include "src/Services/TargetControllerService.hpp" namespace DebugServer::Gdb::AvrGdb::CommandPackets @@ -25,6 +26,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) = 0; }; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/EepromFill.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/EepromFill.cpp index 23cb6c8b..0650bc8b 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/EepromFill.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/EepromFill.cpp @@ -32,6 +32,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling EepromFill packet"); diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/EepromFill.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/EepromFill.hpp index 07011211..936e8656 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/EepromFill.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/EepromFill.hpp @@ -26,6 +26,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.cpp index 1f7b2344..bad5d6ca 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.cpp @@ -23,6 +23,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling FlashDone packet"); diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.hpp index a5ae997f..d96356ce 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashDone.hpp @@ -22,6 +22,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.cpp index 5415bf43..0d5afc3b 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.cpp @@ -46,6 +46,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling FlashErase packet"); diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.hpp index 9a067df5..9c99cae3 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashErase.hpp @@ -26,6 +26,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp index 34ae97d1..78414bd3 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.cpp @@ -43,6 +43,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling FlashWrite packet"); diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.hpp index 89fb5930..424b1b95 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/FlashWrite.hpp @@ -28,6 +28,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.cpp index 0e18f42d..22f630e3 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.cpp @@ -27,6 +27,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling ReadMemory packet"); diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.hpp index fceb87ce..0b6508e8 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemory.hpp @@ -31,6 +31,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.cpp index cb32791b..1eff5eab 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.cpp @@ -41,6 +41,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling ReadMemoryMap packet"); diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.hpp index 591d1391..ecbffb37 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadMemoryMap.hpp @@ -32,6 +32,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegister.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegister.cpp index 4c5b0aaa..5e6cf70f 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegister.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegister.cpp @@ -38,6 +38,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling ReadRegister packet"); @@ -46,12 +47,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets Logger::debug("Reading GDB register ID: " + std::to_string(this->registerId)); if (this->registerId == AvrGdbTargetDescriptor::PROGRAM_COUNTER_GDB_REGISTER_ID) { - /* - * GDB has requested the program counter. We can't access this in the same way as we do with other - * registers. - */ - const auto programCounter = targetControllerService.getProgramCounter(); - + const auto programCounter = targetState.programCounter.load().value(); debugSession.connection.writePacket( ResponsePacket{Services::StringService::toHex(Targets::TargetMemoryBuffer{ static_cast(programCounter), diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegister.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegister.hpp index ee00f711..cf0be1f9 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegister.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegister.hpp @@ -24,6 +24,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegisters.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegisters.cpp index 5c972b0a..187154e4 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegisters.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegisters.cpp @@ -30,6 +30,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling ReadRegisters packet"); @@ -76,7 +77,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets buffer[33] = static_cast(spValue); buffer[34] = static_cast(spValue >> 8); - const auto pcValue = targetControllerService.getProgramCounter(); + const auto pcValue = targetState.programCounter.load().value(); buffer[35] = static_cast(pcValue); buffer[36] = static_cast(pcValue >> 8); buffer[37] = static_cast(pcValue >> 16); diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegisters.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegisters.hpp index a6327a8b..ebeb6123 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegisters.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/ReadRegisters.hpp @@ -24,6 +24,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/RemoveBreakpoint.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/RemoveBreakpoint.cpp index c27f0a1c..ddba6af4 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/RemoveBreakpoint.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/RemoveBreakpoint.cpp @@ -56,6 +56,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor&, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling RemoveBreakpoint packet"); diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/RemoveBreakpoint.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/RemoveBreakpoint.hpp index 73d461ac..259819e8 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/RemoveBreakpoint.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/RemoveBreakpoint.hpp @@ -36,6 +36,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/SetBreakpoint.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/SetBreakpoint.cpp index 1972c790..c454dcf0 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/SetBreakpoint.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/SetBreakpoint.cpp @@ -57,6 +57,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor&, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling SetBreakpoint packet"); diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/SetBreakpoint.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/SetBreakpoint.hpp index fb6f7379..51383da2 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/SetBreakpoint.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/SetBreakpoint.hpp @@ -25,6 +25,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp index b2956c1d..8490ce87 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp @@ -45,6 +45,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { using Targets::Microchip::Avr8::OpcodeDecoder::Decoder; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.hpp index c3726287..c069c2bf 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.hpp @@ -28,6 +28,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContSupportedActionsQuery.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContSupportedActionsQuery.cpp index 48f2f8dd..ddb8016d 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContSupportedActionsQuery.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContSupportedActionsQuery.cpp @@ -16,6 +16,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling VContSupportedActionsQuery packet"); diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContSupportedActionsQuery.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContSupportedActionsQuery.hpp index 7ff6b58c..90fff378 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContSupportedActionsQuery.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContSupportedActionsQuery.hpp @@ -25,6 +25,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.cpp index 8e1ae794..94ebde1c 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.cpp @@ -24,6 +24,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling WriteMemory packet"); diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.hpp index cf4f60d6..0f6ad048 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteMemory.hpp @@ -31,6 +31,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteRegister.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteRegister.cpp index dfc1c054..ba45ae41 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteRegister.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteRegister.cpp @@ -49,6 +49,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling WriteRegister packet"); diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteRegister.hpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteRegister.hpp index 8aa70530..7c8048f1 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteRegister.hpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/WriteRegister.hpp @@ -26,6 +26,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets DebugSession& debugSession, const AvrGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/GdbRspDebugServer.hpp b/src/DebugServer/Gdb/GdbRspDebugServer.hpp index b32aa8a0..79ad29fa 100644 --- a/src/DebugServer/Gdb/GdbRspDebugServer.hpp +++ b/src/DebugServer/Gdb/GdbRspDebugServer.hpp @@ -55,6 +55,7 @@ #include "src/Services/ProcessService.hpp" #include "src/Services/StringService.hpp" #include "src/Targets/TargetDescriptor.hpp" +#include "src/Targets/TargetState.hpp" #include "src/Logger/Logger.hpp" #include "src/EventManager/Events/TargetStateChanged.hpp" @@ -104,6 +105,7 @@ namespace DebugServer::Gdb , gdbTargetDescriptor(std::move(gdbTargetDescriptor)) , eventListener(eventListener) , interruptEventNotifier(eventNotifier) + , targetState(this->targetControllerService.getTargetState()) {}; GdbRspDebugServer() = delete; @@ -238,6 +240,7 @@ namespace DebugServer::Gdb *(this->debugSession), this->gdbTargetDescriptor, this->targetDescriptor, + this->targetState, this->targetControllerService ); @@ -321,6 +324,8 @@ namespace DebugServer::Gdb Services::TargetControllerService targetControllerService = {}; + const Targets::TargetState& targetState; + struct sockaddr_in socketAddress = {}; std::optional serverSocketFileDescriptor; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashDone.cpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashDone.cpp index b72d0dcb..59d52504 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashDone.cpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashDone.cpp @@ -23,6 +23,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling FlashDone packet"); diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashDone.hpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashDone.hpp index 93aafddb..5fac1d98 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashDone.hpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashDone.hpp @@ -22,6 +22,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashErase.cpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashErase.cpp index 07e99dd1..3f80233d 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashErase.cpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashErase.cpp @@ -40,6 +40,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling FlashErase packet"); diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashErase.hpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashErase.hpp index 676d438a..aab33a0e 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashErase.hpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashErase.hpp @@ -25,6 +25,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashWrite.cpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashWrite.cpp index 5e5c588d..e52a586c 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashWrite.cpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashWrite.cpp @@ -43,6 +43,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling FlashWrite packet"); diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashWrite.hpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashWrite.hpp index c3257a04..db1e662c 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashWrite.hpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/FlashWrite.hpp @@ -24,6 +24,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemory.cpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemory.cpp index 82bb2085..170bf5ed 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemory.cpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemory.cpp @@ -27,6 +27,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling ReadMemory packet"); diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemory.hpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemory.hpp index 7ef5e813..6688589a 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemory.hpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemory.hpp @@ -27,6 +27,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemoryMap.cpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemoryMap.cpp index 735efd34..7e019ee1 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemoryMap.cpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemoryMap.cpp @@ -41,6 +41,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { using Targets::TargetMemorySegmentType; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemoryMap.hpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemoryMap.hpp index 297a9e7e..0bc4dae4 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemoryMap.hpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadMemoryMap.hpp @@ -31,6 +31,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegister.cpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegister.cpp index 404f40e2..5b76503e 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegister.cpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegister.cpp @@ -38,6 +38,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling ReadRegister packet"); @@ -46,12 +47,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Logger::debug("Reading GDB register ID: " + std::to_string(this->registerId)); if (this->registerId == gdbTargetDescriptor.programCounterGdbRegisterId) { - /* - * GDB has requested the program counter. We can't access this in the same way as we do with other - * registers. - */ - const auto programCounter = targetControllerService.getProgramCounter(); - + const auto programCounter = targetState.programCounter.load().value(); debugSession.connection.writePacket( ResponsePacket{Services::StringService::toHex(Targets::TargetMemoryBuffer{ static_cast(programCounter), diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegister.hpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegister.hpp index c1def4b8..6ed8ebcd 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegister.hpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegister.hpp @@ -20,6 +20,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegisters.cpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegisters.cpp index a950f42c..7f15a09b 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegisters.cpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegisters.cpp @@ -30,6 +30,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling ReadRegisters packet"); @@ -58,13 +59,11 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets assert((buffer.size() - bufferOffset) >= regVal.size()); - /* - * GDB expects register values in LSB form, which is why we use reverse iterators below. - */ + // GDB expects register values in LSB form, which is why we use reverse iterators below. std::copy(regVal.rbegin(), regVal.rend(), buffer.begin() + bufferOffset); } - const auto pcValue = targetControllerService.getProgramCounter(); + const auto pcValue = targetState.programCounter.load().value(); buffer[totalRegBytes - 4] = static_cast(pcValue); buffer[totalRegBytes - 3] = static_cast(pcValue >> 8); buffer[totalRegBytes - 2] = static_cast(pcValue >> 16); diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegisters.hpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegisters.hpp index 839e2146..90df31d0 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegisters.hpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/ReadRegisters.hpp @@ -21,6 +21,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/RemoveBreakpoint.cpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/RemoveBreakpoint.cpp index e20035ab..2dbac1ba 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/RemoveBreakpoint.cpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/RemoveBreakpoint.cpp @@ -56,6 +56,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor&, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling RemoveBreakpoint packet"); diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/RemoveBreakpoint.hpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/RemoveBreakpoint.hpp index 20ad5ef9..478953d2 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/RemoveBreakpoint.hpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/RemoveBreakpoint.hpp @@ -25,6 +25,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/RiscVGdbCommandPacketInterface.hpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/RiscVGdbCommandPacketInterface.hpp index c68a454f..5ebf7d96 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/RiscVGdbCommandPacketInterface.hpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/RiscVGdbCommandPacketInterface.hpp @@ -4,6 +4,7 @@ #include "src/DebugServer/Gdb/DebugSession.hpp" #include "src/DebugServer/Gdb/RiscVGdb/RiscVGdbTargetDescriptor.hpp" #include "src/Targets/TargetDescriptor.hpp" +#include "src/Targets/TargetState.hpp" #include "src/Services/TargetControllerService.hpp" namespace DebugServer::Gdb::RiscVGdb::CommandPackets @@ -13,18 +14,11 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets public: virtual ~RiscVGdbCommandPacketInterface() = default; - /** - * Should handle the command for the current active debug session. - * - * @param debugSession - * The current active debug session. - * - * @param TargetControllerService - */ virtual void handle( DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) = 0; }; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/SetBreakpoint.cpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/SetBreakpoint.cpp index b66643e9..f304e0b5 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/SetBreakpoint.cpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/SetBreakpoint.cpp @@ -57,6 +57,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor&, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling SetBreakpoint packet"); diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/SetBreakpoint.hpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/SetBreakpoint.hpp index c4e96f17..46ab554c 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/SetBreakpoint.hpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/SetBreakpoint.hpp @@ -32,6 +32,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/VContSupportedActionsQuery.cpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/VContSupportedActionsQuery.cpp index c202bfca..2ab4a248 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/VContSupportedActionsQuery.cpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/VContSupportedActionsQuery.cpp @@ -16,6 +16,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling VContSupportedActionsQuery packet"); diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/VContSupportedActionsQuery.hpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/VContSupportedActionsQuery.hpp index 6bbba447..3db476f1 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/VContSupportedActionsQuery.hpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/VContSupportedActionsQuery.hpp @@ -19,6 +19,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; }; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteMemory.cpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteMemory.cpp index 13ccd623..2615bb5a 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteMemory.cpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteMemory.cpp @@ -24,6 +24,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling WriteMemory packet"); diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteMemory.hpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteMemory.hpp index 8c27b549..e10aa46f 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteMemory.hpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteMemory.hpp @@ -25,6 +25,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteRegister.cpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteRegister.cpp index d434f687..79b0daf3 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteRegister.cpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteRegister.cpp @@ -49,6 +49,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, TargetControllerService& targetControllerService ) { Logger::info("Handling WriteRegister packet"); diff --git a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteRegister.hpp b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteRegister.hpp index 64860990..1c844dc2 100644 --- a/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteRegister.hpp +++ b/src/DebugServer/Gdb/RiscVGdb/CommandPackets/WriteRegister.hpp @@ -23,6 +23,7 @@ namespace DebugServer::Gdb::RiscVGdb::CommandPackets Gdb::DebugSession& debugSession, const RiscVGdbTargetDescriptor& gdbTargetDescriptor, const Targets::TargetDescriptor& targetDescriptor, + const Targets::TargetState& targetState, Services::TargetControllerService& targetControllerService ) override; };