Merge pull request #280263 from DrSergei/fix-breakpoint-range-calculation

Fix breakpoint range calculation
This commit is contained in:
Sergei Druzhkov
2025-12-02 02:42:25 +03:00
committed by GitHub
parent 096ff6d58d
commit e320de7cd1

View File

@@ -1615,7 +1615,10 @@ abstract class MemoryBreakpointAction extends Action2 {
const end = BigInt(endStr);
const address = `0x${start.toString(16)}`;
if (sign === '-') {
return { address, bytes: Number(start - end) };
if (start > end) {
return { error: localize('dataBreakpointAddrOrder', 'End ({1}) should be greater than Start ({0})', startStr, endStr) };
}
return { address, bytes: Number(end - start) };
}
return { address, bytes: Number(end) };