Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-06-21 15:16:14 -0400
committereutarass2011-06-21 15:16:14 -0400
commit34ccbc839b6b9df0c9130724b5028a2ace0439ed (patch)
treecc61087a842f2f944e7088fcae0f771ffa06b0c3 /plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse
parent228d732ce01e8ec04f0e3f98f7c9c304c82e51e6 (diff)
downloadorg.eclipse.tcf-34ccbc839b6b9df0c9130724b5028a2ace0439ed.tar.gz
org.eclipse.tcf-34ccbc839b6b9df0c9130724b5028a2ace0439ed.tar.xz
org.eclipse.tcf-34ccbc839b6b9df0c9130724b5028a2ace0439ed.zip
TCF Debugger: implemented memory contents editing.
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExecContext.java4
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExpressions.java4
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenHoverExpressions.java4
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLocalVariables.java4
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java5
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenSubExpressions.java8
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDebugTask.java8
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFMemoryBlockRetrieval.java59
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java72
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeArrayPartition.java4
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java5
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java19
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java11
13 files changed, 199 insertions, 8 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExecContext.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExecContext.java
index 116592597..c02cf897f 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExecContext.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExecContext.java
@@ -155,6 +155,10 @@ public class TCFChildrenExecContext extends TCFChildren {
for (TCFNode n : getNodes()) ((TCFNodeExecContext)n).onMemoryMapChanged();
}
+ void onMemoryChanged(Number[] addr, long[] size) {
+ for (TCFNode n : getNodes()) ((TCFNodeExecContext)n).onMemoryChanged(addr, size);
+ }
+
void onAncestorContextChanged() {
for (TCFNode n : getNodes()) ((TCFNodeExecContext)n).onAncestorContextChanged();
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExpressions.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExpressions.java
index 2f72e70da..8824ba145 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExpressions.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenExpressions.java
@@ -28,6 +28,10 @@ public class TCFChildrenExpressions extends TCFChildren {
for (TCFNode n : getNodes()) ((TCFNodeExpression)n).onRegisterValueChanged();
}
+ void onMemoryChanged() {
+ for (TCFNode n : getNodes()) ((TCFNodeExpression)n).onMemoryChanged();
+ }
+
private TCFNodeExpression findScript(String text) {
for (TCFNode n : getNodes()) {
TCFNodeExpression e = (TCFNodeExpression)n;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenHoverExpressions.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenHoverExpressions.java
index 26b66b0d1..23bdf9f5c 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenHoverExpressions.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenHoverExpressions.java
@@ -29,6 +29,10 @@ class TCFChildrenHoverExpressions extends TCFChildren {
for (TCFNode n : getNodes()) ((TCFNodeExpression)n).onRegisterValueChanged();
}
+ void onMemoryChanged() {
+ for (TCFNode n : getNodes()) ((TCFNodeExpression)n).onMemoryChanged();
+ }
+
private TCFNodeExpression findScript(String text) {
for (TCFNode n : getNodes()) {
TCFNodeExpression e = (TCFNodeExpression)n;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLocalVariables.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLocalVariables.java
index f068a73ed..fdc1eed18 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLocalVariables.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenLocalVariables.java
@@ -34,6 +34,10 @@ public class TCFChildrenLocalVariables extends TCFChildren {
for (TCFNode n : getNodes()) ((TCFNodeExpression)n).onRegisterValueChanged();
}
+ void onMemoryChanged() {
+ for (TCFNode n : getNodes()) ((TCFNodeExpression)n).onMemoryChanged();
+ }
+
@Override
protected boolean startDataRetrieval() {
IExpressions exps = node.model.getLaunch().getService(IExpressions.class);
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java
index ce9b2e882..3f5a9d2de 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenStackTrace.java
@@ -53,6 +53,11 @@ public class TCFChildrenStackTrace extends TCFChildren {
reset();
}
+ void onMemoryChanged() {
+ for (TCFNode n : getNodes()) ((TCFNodeStackFrame)n).onMemoryChanged();
+ reset();
+ }
+
void onRegisterValueChanged() {
for (TCFNode n : getNodes()) ((TCFNodeStackFrame)n).onRegisterValueChanged();
reset();
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenSubExpressions.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenSubExpressions.java
index 03f0d5067..f1420319c 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenSubExpressions.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildrenSubExpressions.java
@@ -54,6 +54,14 @@ public class TCFChildrenSubExpressions extends TCFChildren {
}
}
+ void onMemoryChanged() {
+ reset();
+ for (TCFNode n : getNodes()) {
+ if (n instanceof TCFNodeExpression) ((TCFNodeExpression)n).onMemoryChanged();
+ if (n instanceof TCFNodeArrayPartition) ((TCFNodeArrayPartition)n).onMemoryChanged();
+ }
+ }
+
void onCastToTypeChanged() {
cancel();
TCFNode a[] = getNodes().toArray(new TCFNode[getNodes().size()]);
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDebugTask.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDebugTask.java
index ddec6c4d1..4a4bf37e6 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDebugTask.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFDebugTask.java
@@ -14,6 +14,7 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugException;
import org.eclipse.tm.internal.tcf.debug.ui.Activator;
+import org.eclipse.tm.tcf.protocol.IChannel;
import org.eclipse.tm.tcf.protocol.Protocol;
import org.eclipse.tm.tcf.util.TCFTask;
@@ -22,6 +23,13 @@ import org.eclipse.tm.tcf.util.TCFTask;
*/
public abstract class TCFDebugTask<V> extends TCFTask<V> {
+ public TCFDebugTask() {
+ }
+
+ public TCFDebugTask(IChannel channel) {
+ super(channel);
+ }
+
public synchronized V getD() throws DebugException {
assert !Protocol.isDispatchThread();
while (!isDone()) {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFMemoryBlockRetrieval.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFMemoryBlockRetrieval.java
index ca9e67849..2f89912af 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFMemoryBlockRetrieval.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFMemoryBlockRetrieval.java
@@ -11,11 +11,14 @@
package org.eclipse.tm.internal.tcf.debug.ui.model;
import java.math.BigInteger;
+import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.debug.core.DebugEvent;
import org.eclipse.debug.core.DebugException;
+import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.model.IDebugTarget;
import org.eclipse.debug.core.model.IMemoryBlock;
@@ -41,6 +44,7 @@ import org.eclipse.tm.tcf.util.TCFDataCache;
class TCFMemoryBlockRetrieval implements IMemoryBlockRetrievalExtension {
private final TCFNodeExecContext exec_ctx;
+ private final HashSet<MemoryBlock> mem_blocks = new HashSet<MemoryBlock>();
private class MemoryBlock extends PlatformObject implements IMemoryBlockExtension {
@@ -56,6 +60,7 @@ class TCFMemoryBlockRetrieval implements IMemoryBlockRetrievalExtension {
MemoryBlock(final String expression, long length) {
this.expression = expression;
this.length = length;
+ mem_blocks.add(this);
final TCFLaunch launch = exec_ctx.model.getLaunch();
final IChannel channel = launch.getChannel();
remote_expression = new TCFDataCache<IExpressions.Expression>(channel) {
@@ -137,7 +142,7 @@ class TCFMemoryBlockRetrieval implements IMemoryBlockRetrievalExtension {
}
public void dispose() throws DebugException {
- new TCFDebugTask<Boolean>() {
+ new TCFDebugTask<Boolean>(exec_ctx.getChannel()) {
public void run() {
disposed = true;
expression_value.dispose();
@@ -156,13 +161,14 @@ class TCFMemoryBlockRetrieval implements IMemoryBlockRetrievalExtension {
}
}
remote_expression.dispose();
+ mem_blocks.remove(MemoryBlock.this);
done(Boolean.TRUE);
}
}.getD();
}
public int getAddressSize() throws DebugException {
- return new TCFDebugTask<Integer>() {
+ return new TCFDebugTask<Integer>(exec_ctx.getChannel()) {
public void run() {
if (exec_ctx.isDisposed()) {
error("Context is disposed");
@@ -213,7 +219,7 @@ class TCFMemoryBlockRetrieval implements IMemoryBlockRetrievalExtension {
}
public BigInteger getBigBaseAddress() throws DebugException {
- return new TCFDebugTask<BigInteger>() {
+ return new TCFDebugTask<BigInteger>(exec_ctx.getChannel()) {
public void run() {
if (!expression_value.validate()) {
expression_value.wait(this);
@@ -247,7 +253,7 @@ class TCFMemoryBlockRetrieval implements IMemoryBlockRetrievalExtension {
}
public MemoryByte[] getBytesFromAddress(final BigInteger address, final long units) throws DebugException {
- return new TCFDebugTask<MemoryByte[]>() {
+ return new TCFDebugTask<MemoryByte[]>(exec_ctx.getChannel()) {
int offs = 0;
public void run() {
if (exec_ctx.isDisposed()) {
@@ -343,7 +349,38 @@ class TCFMemoryBlockRetrieval implements IMemoryBlockRetrievalExtension {
public void setBaseAddress(BigInteger address) throws DebugException {
}
- public void setValue(BigInteger offset, byte[] bytes) throws DebugException {
+ public void setValue(BigInteger offset, final byte[] bytes) throws DebugException {
+ final BigInteger address = getBigBaseAddress().add(offset);
+ new TCFDebugTask<Object>(exec_ctx.getChannel()) {
+ public void run() {
+ if (exec_ctx.isDisposed()) {
+ error("Context is disposed");
+ return;
+ }
+ TCFDataCache<IMemory.MemoryContext> cache = exec_ctx.getMemoryContext();
+ if (!cache.validate(this)) return;
+ if (cache.getError() != null) {
+ error(cache.getError());
+ return;
+ }
+ final IMemory.MemoryContext mem = cache.getData();
+ if (mem == null) {
+ error("Context does not provide memory access");
+ return;
+ }
+ final int mode = IMemory.MODE_CONTINUEONERROR | IMemory.MODE_VERIFY;
+ mem.set(address, 1, bytes, 0, bytes.length, mode, new IMemory.DoneMemory() {
+ public void doneMemory(IToken token, MemoryError error) {
+ if (error != null) {
+ error(error);
+ }
+ else {
+ done(null);
+ }
+ }
+ });
+ }
+ }.getD();
}
public boolean supportBaseAddressModification() throws DebugException {
@@ -359,10 +396,11 @@ class TCFMemoryBlockRetrieval implements IMemoryBlockRetrievalExtension {
}
public void setValue(long offset, byte[] bytes) throws DebugException {
+ setValue(BigInteger.valueOf(offset), bytes);
}
public boolean supportsValueModification() {
- return false;
+ return true;
}
public IDebugTarget getDebugTarget() {
@@ -409,4 +447,13 @@ class TCFMemoryBlockRetrieval implements IMemoryBlockRetrievalExtension {
public boolean supportsStorageRetrieval() {
return true;
}
+
+ void onMemoryChanged() {
+ if (mem_blocks.size() == 0) return;
+ ArrayList<DebugEvent> list = new ArrayList<DebugEvent>();
+ for (MemoryBlock b : mem_blocks) {
+ list.add(new DebugEvent(b, DebugEvent.CHANGE, DebugEvent.CONTENT));
+ }
+ DebugPlugin.getDefault().fireDebugEventSet(list.toArray(new DebugEvent[list.size()]));
+ }
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
index 52946b973..7c15c7657 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
@@ -17,6 +17,7 @@ import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.DebugPlugin;
@@ -199,8 +200,59 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
private final Map<Class<?>,Object> adapters = new HashMap<Class<?>,Object>();
- private final Map<String,IMemoryBlockRetrievalExtension> mem_retrieval =
- new HashMap<String,IMemoryBlockRetrievalExtension>();
+ private class MemoryBlocksUpdate extends TCFDataCache<Map<String,TCFMemoryBlockRetrieval>> {
+
+ private final Set<String> changeset = new HashSet<String>();
+
+ MemoryBlocksUpdate(IChannel channel) {
+ super(channel);
+ Protocol.invokeLater(new Runnable() {
+ public void run() {
+ if (!validate(this)) return;
+ Map<String,TCFMemoryBlockRetrieval> map = getData();
+ for (TCFMemoryBlockRetrieval r : map.values()) r.onMemoryChanged();
+ launch.removePendingClient(mem_blocks_update);
+ mem_blocks_update = null;
+ }
+ });
+ }
+
+ void add(String id) {
+ changeset.add(id);
+ }
+
+ public boolean startDataRetrieval() {
+ // Map changed contexts to memory nodes, and then to memory block retrieval objects
+ Map<String,TCFMemoryBlockRetrieval> map = new HashMap<String,TCFMemoryBlockRetrieval>();
+ for (String id : changeset) {
+ if (map.get(id) != null) continue;
+ TCFNode node = id2node.get(id);
+ if (node == null) {
+ if (!createNode(id, this)) return false;
+ if (isValid()) {
+ Activator.log("Cannot create debug model node", getError());
+ reset();
+ continue;
+ }
+ node = id2node.get(id);
+ }
+ if (node instanceof TCFNodeExecContext) {
+ TCFDataCache<TCFNodeExecContext> c = ((TCFNodeExecContext)node).getMemoryNode();
+ if (!c.validate(this)) return false;
+ node = c.getData();
+ if (node == null) continue;
+ if (map.get(node.id) != null) continue;
+ TCFMemoryBlockRetrieval r = mem_retrieval.get(node.id);
+ if (r != null) map.put(node.id, r);
+ }
+ }
+ set(null, null, map);
+ return true;
+ }
+ }
+
+ private final Map<String,TCFMemoryBlockRetrieval> mem_retrieval = new HashMap<String,TCFMemoryBlockRetrieval>();
+ private MemoryBlocksUpdate mem_blocks_update;
private final Map<String,String> cast_to_type_map =
new HashMap<String,String>();
@@ -267,6 +319,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
if (node instanceof TCFNodeExecContext) {
((TCFNodeExecContext)node).onContextChanged(ctx);
}
+ onMemoryChanged(ctx.getID());
}
}
@@ -279,6 +332,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
if (node instanceof TCFNodeExecContext) {
((TCFNodeExecContext)node).onMemoryChanged(addr, size);
}
+ onMemoryChanged(context_id);
}
};
@@ -304,6 +358,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
if (node instanceof TCFNodeExecContext) {
((TCFNodeExecContext)node).onContainerSuspended();
}
+ onMemoryChanged(id);
}
TCFNode node = getNode(context);
if (node instanceof TCFNodeExecContext) {
@@ -339,6 +394,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
if (node instanceof TCFNodeExecContext) {
((TCFNodeExecContext)node).onContextChanged(ctx);
}
+ onMemoryChanged(id);
}
launch_node.onAnyContextSuspendedOrChanged();
}
@@ -371,6 +427,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
}
launch_node.onAnyContextSuspendedOrChanged();
if (active_actions.get(id) == null) setDebugViewSelection(node, reason);
+ onMemoryChanged(id);
}
};
@@ -676,6 +733,17 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
Activator.log(bf.toString(), x);
}
+ void onMemoryChanged(String id) {
+ if (channel == null) return;
+ if (mem_blocks_update == null) {
+ mem_blocks_update = new MemoryBlocksUpdate(channel);
+ if (wait_for_views_update_after_step) {
+ launch.addPendingClient(mem_blocks_update);
+ }
+ }
+ mem_blocks_update.add(id);
+ }
+
public TCFAction getActiveAction(String id) {
return active_actions.get(id);
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeArrayPartition.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeArrayPartition.java
index 278659d22..e120666fa 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeArrayPartition.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeArrayPartition.java
@@ -89,6 +89,10 @@ public class TCFNodeArrayPartition extends TCFNode {
children.onRegisterValueChanged();
}
+ void onMemoryChanged() {
+ children.onMemoryChanged();
+ }
+
@Override
public int compareTo(TCFNode n) {
TCFNodeArrayPartition p = (TCFNodeArrayPartition)n;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
index 2a251dbb3..cdeb301d1 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
@@ -1269,6 +1269,10 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
void onMemoryChanged(Number[] addr, long[] size) {
assert !isDisposed();
+ children_exec.onMemoryChanged(addr, size);
+ children_stack.onMemoryChanged();
+ children_exps.onMemoryChanged();
+ postContentChangedDelta();
}
void onMemoryMapChanged() {
@@ -1292,6 +1296,7 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner {
}
address.reset();
children_stack.onRegisterValueChanged();
+ children_exps.onRegisterValueChanged();
postContentChangedDelta();
}
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java
index bbbf451f7..a7909ea2f 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExpression.java
@@ -517,6 +517,17 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
postAllChangedDelta();
}
+ void onMemoryChanged() {
+ value.reset();
+ type.reset();
+ type_name.reset();
+ string.reset();
+ children.onMemoryChanged();
+ if (parent instanceof TCFNodeExpression) return;
+ if (parent instanceof TCFNodeArrayPartition) return;
+ postAllChangedDelta();
+ }
+
void onValueChanged() {
value.reset();
type.reset();
@@ -1351,6 +1362,14 @@ public class TCFNodeExpression extends TCFNode implements IElementEditor, ICastT
IExpressions exps = node.launch.getService(IExpressions.class);
exps.assign(exp.getID(), bf, new IExpressions.DoneAssign() {
public void doneAssign(IToken token, Exception error) {
+ TCFNode exe = node;
+ while (exe != null) {
+ if (exe instanceof TCFNodeExecContext) {
+ exe.model.onMemoryChanged(exe.id);
+ break;
+ }
+ exe = exe.parent;
+ }
node.getRootExpression().onValueChanged();
if (error != null) {
node.model.showMessageBox("Cannot modify element value", error);
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java
index 3d8902620..d8c0712aa 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeStackFrame.java
@@ -444,6 +444,17 @@ public class TCFNodeStackFrame extends TCFNode {
postStateChangedDelta();
}
+ void onMemoryChanged() {
+ stack_trace_context.cancel();
+ line_info.cancel();
+ func_info.cancel();
+ address.cancel();
+ children_vars.onMemoryChanged();
+ children_exps.onMemoryChanged();
+ children_hover_exps.onMemoryChanged();
+ postStateChangedDelta();
+ }
+
void onRegistersChanged() {
children_regs.onRegistersChanged();
postAllChangedDelta();

Back to the top