1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 07:05:24 +02:00

Fixes for Bug234314 and Bug234289

This commit is contained in:
Francois Chouinard 2008-05-28 13:40:49 +00:00
parent df5a3a60e0
commit 1720457ddb
3 changed files with 11 additions and 8 deletions

View file

@ -472,6 +472,15 @@ public class DsfMemoryBlock extends PlatformObject implements IMemoryBlockExtens
drm.setData(getData());
drm.done();
}
@Override
protected void handleFailure() {
// Bug234289: If memory read fails, return a block marked as invalid
MemoryByte[] block = new MemoryByte[fWordSize * (int) length];
for (int i = 0; i < block.length; i++)
block[i] = new MemoryByte((byte) 0, (byte) 0);
drm.setData(block);
drm.done();
}
});
}

View file

@ -49,7 +49,7 @@ public class CountingRequestMonitor extends RequestMonitor {
public CountingRequestMonitor(Executor executor, RequestMonitor parentRequestMonitor) {
super(executor, parentRequestMonitor);
setStatus(new MultiStatus(DsfPlugin.PLUGIN_ID, 0, "Collective status for set of sub-operations.", null)); //$NON-NLS-1$
super.setStatus(new MultiStatus(DsfPlugin.PLUGIN_ID, 0, "Collective status for set of sub-operations.", null)); //$NON-NLS-1$
}
/**

View file

@ -877,13 +877,7 @@ public class MIMemory extends AbstractDsfService implements IMemory {
{
// Each byte is written individually (GDB power...)
// so we need to keep track of the count
final CountingRequestMonitor countingRM =
new CountingRequestMonitor(getExecutor(), rm) {
@Override
protected void handleSuccess() {
rm.done();
}
};
final CountingRequestMonitor countingRM = new CountingRequestMonitor(getExecutor(), rm);
countingRM.setDoneCount(count);
// We will format the individual bytes in decimal