From 2afca42f1d7f8ea9b3d7c467cfb397ad1c83a4b6 Mon Sep 17 00:00:00 2001 From: Nav Date: Fri, 7 Mar 2025 19:12:41 +0000 Subject: [PATCH] Tidying --- src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp | 3 +-- src/DebugToolDrivers/Wch/WchLinkDebugInterface.cpp | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp index 2eaed8d1..790e62bf 100644 --- a/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp +++ b/src/DebugServer/Gdb/AvrGdb/CommandPackets/VContRangeStep.cpp @@ -141,8 +141,7 @@ namespace DebugServer::Gdb::AvrGdb::CommandPackets Logger::debug( "Failed to decode AVR8 opcode at byte address 0x" + StringService::toHex(instructionAddress) - + " - the instruction proceeds a BREAK instruction, so the decode failure was " - "ignored." + + " - the instruction proceeds a BREAK instruction, so the decode failure was ignored." ); previousInstruction = nullptr; diff --git a/src/DebugToolDrivers/Wch/WchLinkDebugInterface.cpp b/src/DebugToolDrivers/Wch/WchLinkDebugInterface.cpp index 3266a151..7fe4c351 100644 --- a/src/DebugToolDrivers/Wch/WchLinkDebugInterface.cpp +++ b/src/DebugToolDrivers/Wch/WchLinkDebugInterface.cpp @@ -570,8 +570,6 @@ namespace DebugToolDrivers::Wch + ") has resulted in a segment boundary breach" ); - alignedAddressRange.endAddress -= this->programmingBlockSize; - /* * This function isn't designed to handle instances where the entire write operation needs to be * delegated. In such instances, this function should not be called at all. The following assertion @@ -580,8 +578,9 @@ namespace DebugToolDrivers::Wch * The WchLinkDebugInterface::fullBlockWriteCompatible() function will determine if at least part of * the operation can be performed using the full block write method. */ - assert(alignedAddressRange.intersectsWith(addressRange)); + assert(alignedAddressRange.size() > this->programmingBlockSize); + alignedAddressRange.endAddress -= this->programmingBlockSize; delegatedBytes = addressRange.endAddress - alignedAddressRange.endAddress; Logger::debug(