From 25f35a02c8aaa38c5f2fa2625ce848229371d744 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Thu, 31 Oct 2002 22:28:21 +0000 Subject: [PATCH] Fix for synchronization bug in CFormattedMemoryBlock. --- .../debug/internal/core/model/CFormattedMemoryBlock.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CFormattedMemoryBlock.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CFormattedMemoryBlock.java index e50da515ff5..34516f6d66a 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CFormattedMemoryBlock.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CFormattedMemoryBlock.java @@ -85,14 +85,14 @@ public class CFormattedMemoryBlock extends CDebugElement Arrays.fill( fDirtyBytes, false ); } - public void set( int start, int end, boolean value ) + public void set( int start, int length, boolean value ) { - Arrays.fill( fDirtyBytes, start, end, value ); + Arrays.fill( fDirtyBytes, start, start + length, value ); } public void set( ByteRange range, boolean value ) { - Arrays.fill( fDirtyBytes, range.getStart(), range.getLength(), value ); + Arrays.fill( fDirtyBytes, range.getStart(), range.getStart() + range.getLength(), value ); } public ByteRange[] getDirtyRanges( byte[] bytes ) @@ -599,7 +599,7 @@ public class CFormattedMemoryBlock extends CDebugElement { byte[] bytes = itemToBytes( newValue.toCharArray() ); setBytes( index * getWordSize(), bytes ); - fDirtyBytes.set( index * getWordSize(), index * getWordSize() + bytes.length, true ); + fDirtyBytes.set( index * getWordSize(), bytes.length, true ); resetRows(); }