From ed3ddbe3fd5a6894cd34e178f0b9e0ca523cbed9 Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 23 Sep 2023 21:51:09 +0100 Subject: [PATCH] Removed intercepting breakpoint on end address of a stepping range. Replaced with `runTo` operation --- src/DebugServer/Gdb/AvrGdb/AvrGdbRsp.cpp | 5 ++++- .../Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp | 13 ------------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/src/DebugServer/Gdb/AvrGdb/AvrGdbRsp.cpp b/src/DebugServer/Gdb/AvrGdb/AvrGdbRsp.cpp index 95ed4d1d..841628ed 100644 --- a/src/DebugServer/Gdb/AvrGdb/AvrGdbRsp.cpp +++ b/src/DebugServer/Gdb/AvrGdb/AvrGdbRsp.cpp @@ -196,7 +196,10 @@ namespace DebugServer::Gdb::AvrGdb Logger::debug("Continuing range stepping"); activeRangeSteppingSession->singleStepping = false; - this->targetControllerService.continueTargetExecution(std::nullopt, std::nullopt); + this->targetControllerService.continueTargetExecution( + std::nullopt, + activeRangeSteppingSession->range.endAddress + ); return; } diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp index 61053866..bb29bf29 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp @@ -183,19 +183,6 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets rangeSteppingSession.interceptedAddresses.insert(*destinationAddress); } } - - const auto subsequentInstructionAddress = instructionAddress + instruction->byteSize; - if (subsequentInstructionAddress >= addressRange.endAddress) { - /* - * Once this instruction has been executed, we'll end up outside the stepping range (so we'll want - * to stop there and report back to GDB). - */ - Logger::debug( - "Intercepting subsequent instruction at byte address 0x" - + StringService::toHex(subsequentInstructionAddress) - ); - rangeSteppingSession.interceptedAddresses.insert(subsequentInstructionAddress); - } } debugSession.startRangeSteppingSession(std::move(rangeSteppingSession), targetControllerService);