mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-20 07:25:23 +02:00
Fixes for Bug234314 and Bug234289
This commit is contained in:
parent
df5a3a60e0
commit
1720457ddb
3 changed files with 11 additions and 8 deletions
|
@ -472,6 +472,15 @@ public class DsfMemoryBlock extends PlatformObject implements IMemoryBlockExtens
|
||||||
drm.setData(getData());
|
drm.setData(getData());
|
||||||
drm.done();
|
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();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ public class CountingRequestMonitor extends RequestMonitor {
|
||||||
|
|
||||||
public CountingRequestMonitor(Executor executor, RequestMonitor parentRequestMonitor) {
|
public CountingRequestMonitor(Executor executor, RequestMonitor parentRequestMonitor) {
|
||||||
super(executor, 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$
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -877,13 +877,7 @@ public class MIMemory extends AbstractDsfService implements IMemory {
|
||||||
{
|
{
|
||||||
// Each byte is written individually (GDB power...)
|
// Each byte is written individually (GDB power...)
|
||||||
// so we need to keep track of the count
|
// so we need to keep track of the count
|
||||||
final CountingRequestMonitor countingRM =
|
final CountingRequestMonitor countingRM = new CountingRequestMonitor(getExecutor(), rm);
|
||||||
new CountingRequestMonitor(getExecutor(), rm) {
|
|
||||||
@Override
|
|
||||||
protected void handleSuccess() {
|
|
||||||
rm.done();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
countingRM.setDoneCount(count);
|
countingRM.setDoneCount(count);
|
||||||
|
|
||||||
// We will format the individual bytes in decimal
|
// We will format the individual bytes in decimal
|
||||||
|
|
Loading…
Add table
Reference in a new issue