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:
parent
075e29a48e
commit
acd6a6b567
1 changed files with 11 additions and 1 deletions
|
@ -115,7 +115,17 @@ public class MemoryBlock extends CObject implements ICDIMemoryBlock {
|
|||
public void refresh() throws CDIException {
|
||||
MemoryManager mgr = (MemoryManager)getCTarget().getCSession().getMemoryManager();
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue