mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
update() new Method.
This commit is contained in:
parent
83a366657f
commit
57bc7c4a2d
1 changed files with 19 additions and 7 deletions
|
@ -44,13 +44,7 @@ public class MemoryManager extends SessionObject implements ICDIMemoryManager {
|
||||||
for (int i = 0; i < blocks.length; i++) {
|
for (int i = 0; i < blocks.length; i++) {
|
||||||
if (! blocks[i].isFrozen()) {
|
if (! blocks[i].isFrozen()) {
|
||||||
try {
|
try {
|
||||||
MemoryBlock block = cloneBlock(blocks[i]);
|
update(blocks[i], eventList);
|
||||||
Long[] array = compareBlocks(blocks[i], block);
|
|
||||||
if (array.length > 0) {
|
|
||||||
eventList.add(new MIMemoryChangedEvent(array));
|
|
||||||
}
|
|
||||||
// Update the block MIDataReadMemoryInfo.
|
|
||||||
blocks[i].setMIDataReadMemoryInfo(block.getMIDataReadMemoryInfo());
|
|
||||||
} catch (CDIException e) {
|
} catch (CDIException e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,6 +53,24 @@ public class MemoryManager extends SessionObject implements ICDIMemoryManager {
|
||||||
mi.fireEvents(events);
|
mi.fireEvents(events);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update one Block.
|
||||||
|
*/
|
||||||
|
public void update(MemoryBlock block, List aList) throws CDIException {
|
||||||
|
MemoryBlock newBlock = cloneBlock(block);
|
||||||
|
Long[] array = compareBlocks(block, newBlock);
|
||||||
|
// Update the block MIDataReadMemoryInfo.
|
||||||
|
block.setMIDataReadMemoryInfo(newBlock.getMIDataReadMemoryInfo());
|
||||||
|
if (array.length > 0) {
|
||||||
|
if (aList != null) {
|
||||||
|
aList.add(new MIMemoryChangedEvent(array));
|
||||||
|
} else {
|
||||||
|
MISession mi = getCSession().getMISession();
|
||||||
|
mi.fireEvent(new MIMemoryChangedEvent(array));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the registers MemoryBlock.
|
* @return the registers MemoryBlock.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Reference in a new issue