mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 01:05:38 +02:00
Applied patch in bug 191583. Logic not taking into account blocks with addressable size > 1.
This commit is contained in:
parent
bc7b6a3bd8
commit
2250bfc3d6
1 changed files with 5 additions and 3 deletions
|
@ -384,9 +384,11 @@ public class CMemoryBlockExtension extends CDebugElement implements IMemoryBlock
|
|||
saveChanges( addresses );
|
||||
for ( int i = 0; i < addresses.length; ++i ) {
|
||||
fChanges.add( addresses[i] );
|
||||
if ( addresses[i].compareTo( start ) >= 0 && addresses[i].compareTo( start.add( BigInteger.valueOf( length ) ) ) < 0 ) {
|
||||
int index = addresses[i].subtract( start ).intValue();
|
||||
if ( index >= 0 && index < memBytes.length && index < newBytes.length ) {
|
||||
int addressableSize = fCDIBlock.getWordSize(); // # of bytes per address
|
||||
if ( addresses[i].compareTo( start ) >= 0 && addresses[i].compareTo( start.add( BigInteger.valueOf( length / addressableSize ) ) ) < 0 ) {
|
||||
int index = addressableSize * addresses[i].subtract( start ).intValue();
|
||||
int end = Math.min(Math.min(index + addressableSize, memBytes.length), newBytes.length);
|
||||
for (index = Math.max(index, 0) ; index < end; index++ ) {
|
||||
memBytes[index].setChanged( true );
|
||||
memBytes[index].setValue( newBytes[index] );
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue