From be5e89456c335074dd26da74a8664885792c8a61 Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 16 Sep 2023 03:06:18 +0100 Subject: [PATCH] Fall back to single stepping if address range from GDB is less than one word. --- src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp index 71eccb46..1b8d36d7 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp @@ -88,7 +88,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets debugSession.terminateRangeSteppingSession(targetControllerService); } - if (this->startAddress == this->endAddress || (this->endAddress - this->startAddress) == 2) { + if (this->startAddress == this->endAddress || (this->endAddress - this->startAddress) <= 2) { // Single step requested. No need for a range step here. targetControllerService.stepTargetExecution(std::nullopt); debugSession.waitingForBreak = true;