Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2016-03-24 19:17:32 +0000
committerEugene Tarassov2016-03-24 19:17:32 +0000
commitda0f96fa1429b4ff6b48e055622be15650db8632 (patch)
tree5dd972c2bddd7bb3d3884adba1e4bcc82ebbc291 /plugins
parent7d6226ce728c8f32d439e3f8c5e1f7ecabb74ff5 (diff)
downloadorg.eclipse.tcf-da0f96fa1429b4ff6b48e055622be15650db8632.tar.gz
org.eclipse.tcf-da0f96fa1429b4ff6b48e055622be15650db8632.tar.xz
org.eclipse.tcf-da0f96fa1429b4ff6b48e055622be15650db8632.zip
TCF Debugger: fixed: memory block address should be re-computed when context state changes.
This is needed to support use of variables in the address expression.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFMemoryBlock.java37
1 files changed, 21 insertions, 16 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFMemoryBlock.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFMemoryBlock.java
index 860aa42f2..33eb88b1e 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFMemoryBlock.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFMemoryBlock.java
@@ -220,6 +220,23 @@ class TCFMemoryBlock extends PlatformObject implements IMemoryBlockExtension, IM
});
return false;
}
+ @Override
+ public void reset() {
+ if (isValid() && getData() != null) {
+ if (channel.getState() == IChannel.STATE_OPEN) {
+ IExpressions exps = channel.getRemoteService(IExpressions.class);
+ exps.dispose(remote_expression.getData().getID(), new IExpressions.DoneDispose() {
+ @Override
+ public void doneDispose(IToken token, Exception error) {
+ if (error == null) return;
+ if (channel.getState() != IChannel.STATE_OPEN) return;
+ Activator.log("Error disposing remote expression evaluator", error);
+ }
+ });
+ }
+ }
+ super.reset();
+ }
};
expression_value = new TCFDataCache<IExpressions.Value>(channel) {
@Override
@@ -227,7 +244,7 @@ class TCFMemoryBlock extends PlatformObject implements IMemoryBlockExtension, IM
if (!remote_expression.validate(this)) return false;
final IExpressions.Expression ctx = remote_expression.getData();
if (ctx == null) {
- set(null, null, null);
+ set(null, remote_expression.getError(), null);
return true;
}
IExpressions exps = launch.getService(IExpressions.class);
@@ -641,6 +658,8 @@ class TCFMemoryBlock extends PlatformObject implements IMemoryBlockExtension, IM
void onMemoryChanged(boolean suspended) {
assert Protocol.isDispatchThread();
+ remote_expression.reset();
+ expression_value.reset();
if (suspended) mem_prev = mem_last;
mem_data = null;
synchronized (model_proxies) {
@@ -653,22 +672,8 @@ class TCFMemoryBlock extends PlatformObject implements IMemoryBlockExtension, IM
void onContextExited(String id) {
assert Protocol.isDispatchThread();
if (!id.equals(ctx_id)) return;
+ remote_expression.reset();
expression_value.reset();
- if (remote_expression.isValid() && remote_expression.getData() != null) {
- final IChannel channel = model.getChannel();
- if (channel.getState() == IChannel.STATE_OPEN) {
- IExpressions exps = channel.getRemoteService(IExpressions.class);
- exps.dispose(remote_expression.getData().getID(), new IExpressions.DoneDispose() {
- @Override
- public void doneDispose(IToken token, Exception error) {
- if (error == null) return;
- if (channel.getState() != IChannel.STATE_OPEN) return;
- Activator.log("Error disposing remote expression evaluator", error);
- }
- });
- }
- remote_expression.reset();
- }
}
/************************** Persistence ***************************************************/

Back to the top