Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2015-06-15 18:30:49 -0400
committerEugene Tarassov2015-06-15 18:30:49 -0400
commit5bacb286c7e61ef57cf1af691a2f84be0464760d (patch)
tree9307139115a012dc5f240e2b030c671cea35321a /plugins
parentbe223e40664c941dc7287695dcc03383dcedbb06 (diff)
downloadorg.eclipse.tcf-5bacb286c7e61ef57cf1af691a2f84be0464760d.tar.gz
org.eclipse.tcf-5bacb286c7e61ef57cf1af691a2f84be0464760d.tar.xz
org.eclipse.tcf-5bacb286c7e61ef57cf1af691a2f84be0464760d.zip
TCF Debugger: fixed possible assertion failure while handling target notification about register definitions change
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java10
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java1
2 files changed, 11 insertions, 0 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
index 1fe1468ab..f705aa4a7 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
@@ -523,10 +523,20 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab
private final IRegisters.RegistersListener reg_listener = new IRegisters.RegistersListener() {
public void contextChanged() {
+ LinkedList<TCFNode> regs = new LinkedList<TCFNode>();
for (TCFNode node : id2node.values()) {
if (node instanceof TCFNodeExecContext) {
((TCFNodeExecContext)node).onRegistersChanged();
}
+ if (node instanceof TCFNodeRegister) {
+ assert !node.isDisposed();
+ regs.add(node);
+ }
+ }
+ // Must dispose all register nodes, because a register
+ // can move to a different parent
+ for (TCFNode node : regs) {
+ if (!node.isDisposed()) node.dispose();
}
}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java
index 12d004581..5147366fe 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFNodeExecContext.java
@@ -1627,6 +1627,7 @@ public class TCFNodeExecContext extends TCFNode implements ISymbolOwner, ITCFExe
void onRegistersChanged() {
children_stack.onRegistersChanged();
+ children_regs.onRegistersChanged();
postContentChangedDelta();
}

Back to the top