Corrected handling of empty address range in range step GDB command
This commit is contained in:
@@ -72,7 +72,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
|||||||
).addressRange;
|
).addressRange;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
this->startAddress >= this->endAddress
|
this->startAddress > this->endAddress
|
||||||
|| (this->startAddress % 2) != 0
|
|| (this->startAddress % 2) != 0
|
||||||
|| (this->endAddress % 2) != 0
|
|| (this->endAddress % 2) != 0
|
||||||
|| this->startAddress < programMemoryAddressRange.startAddress
|
|| this->startAddress < programMemoryAddressRange.startAddress
|
||||||
@@ -88,7 +88,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets
|
|||||||
debugSession.terminateRangeSteppingSession(targetControllerService);
|
debugSession.terminateRangeSteppingSession(targetControllerService);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((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.
|
// Single step requested. No need for a range step here.
|
||||||
targetControllerService.stepTargetExecution(std::nullopt);
|
targetControllerService.stepTargetExecution(std::nullopt);
|
||||||
debugSession.waitingForBreak = true;
|
debugSession.waitingForBreak = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user