1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 100298: [Memory View] Changing variable's value from variables view or memory view doesn't sync to each other.

This commit is contained in:
Mikhail Khodjaiants 2005-11-29 19:46:10 +00:00
parent a7d1231811
commit a6a01fae51
3 changed files with 37 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2005-11-29 Mikhail Khodjaiants
Bug 100298: [Memory View] Changing variable's value from variables view or memory view doesn't sync to each other.
* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Variable.java
* cdi/org/eclipse/cdt/debug/mi/core/cdi/model/MemoryBlock.java
2005-11-02 Mikhail Khodjaiants
Bug 113364: Wrong values displaying an array of structures.
Previous fix didn't work for classes with access specifiers.

View file

@ -19,9 +19,12 @@ import org.eclipse.cdt.debug.mi.core.MIException;
import org.eclipse.cdt.debug.mi.core.MIFormat;
import org.eclipse.cdt.debug.mi.core.MISession;
import org.eclipse.cdt.debug.mi.core.cdi.CdiResources;
import org.eclipse.cdt.debug.mi.core.cdi.ExpressionManager;
import org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException;
import org.eclipse.cdt.debug.mi.core.cdi.MemoryManager;
import org.eclipse.cdt.debug.mi.core.cdi.RegisterManager;
import org.eclipse.cdt.debug.mi.core.cdi.Session;
import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
import org.eclipse.cdt.debug.mi.core.command.MIDataWriteMemory;
import org.eclipse.cdt.debug.mi.core.output.MIDataReadMemoryInfo;
@ -270,6 +273,26 @@ public class MemoryBlock extends CObject implements ICDIMemoryBlock {
}
// If the assign was succesfull fire a MIChangedEvent() via refresh.
refresh();
Target target = (Target)getTarget();
// If register manager is on autoupdate, update all registers
RegisterManager regMgr = ((Session)target.getSession()).getRegisterManager();
if (regMgr.isAutoUpdate()) {
regMgr.update(target);
}
// If expression manager is on autoupdate, update all expressions
ExpressionManager expMgr = ((Session)target.getSession()).getExpressionManager();
if (expMgr.isAutoUpdate()) {
expMgr.update(target);
}
// If variable manager is on autoupdate, update all variables.
VariableManager varMgr = ((Session)target.getSession()).getVariableManager();
if (varMgr.isAutoUpdate()) {
varMgr.update(target);
}
}
/* (non-Javadoc)

View file

@ -37,6 +37,7 @@ import org.eclipse.cdt.debug.mi.core.cdi.CdiResources;
import org.eclipse.cdt.debug.mi.core.cdi.ExpressionManager;
import org.eclipse.cdt.debug.mi.core.cdi.Format;
import org.eclipse.cdt.debug.mi.core.cdi.MI2CDIException;
import org.eclipse.cdt.debug.mi.core.cdi.MemoryManager;
import org.eclipse.cdt.debug.mi.core.cdi.RegisterManager;
import org.eclipse.cdt.debug.mi.core.cdi.Session;
import org.eclipse.cdt.debug.mi.core.cdi.VariableManager;
@ -402,17 +403,23 @@ public abstract class Variable extends VariableDescriptor implements ICDIVariabl
regMgr.update(target);
}
// If expression was on autoupdate, update all the other expression
// If expression manager is on autoupdate, update all expressions
ExpressionManager expMgr = ((Session)target.getSession()).getExpressionManager();
if (expMgr.isAutoUpdate()) {
expMgr.update(target);
}
// If variable was on autoupdate, update all the variables.
// If variable manager is on autoupdate, update all variables
VariableManager varMgr = ((Session)target.getSession()).getVariableManager();
if (varMgr.isAutoUpdate()) {
varMgr.update(target);
}
// If memory manager is on autoupdate, update all memory blocks
MemoryManager memMgr = ((Session)target.getSession()).getMemoryManager();
if (memMgr.isAutoUpdate()) {
memMgr.update(target);
}
}
/**