1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Refresh any other needed block.

This commit is contained in:
Alain Magloire 2002-11-01 16:41:29 +00:00
parent 075e29a48e
commit acd6a6b567

View file

@ -115,7 +115,17 @@ public class MemoryBlock extends CObject implements ICDIMemoryBlock {
public void refresh() throws CDIException { public void refresh() throws CDIException {
MemoryManager mgr = (MemoryManager)getCTarget().getCSession().getMemoryManager(); MemoryManager mgr = (MemoryManager)getCTarget().getCSession().getMemoryManager();
setDirty(true); setDirty(true);
mgr.update(this, null); Long[] addresses = mgr.update(this, null);
// Check if this affects other blocks.
if (addresses.length > 0) {
MemoryBlock[] blocks = mgr.listMemoryBlocks();
for (int i = 0; i < blocks.length; i++) {
if (! blocks[i].equals(this) && blocks[i].contains(addresses)) {
blocks[i].setDirty(false);
mgr.update(blocks[i], null);
}
}
}
} }
/** /**