Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDebugTask.java2
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFMemoryBlockRetrieval.java16
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java13
3 files changed, 22 insertions, 9 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDebugTask.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDebugTask.java
index 609c99c6e..a00089654 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDebugTask.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFDebugTask.java
@@ -47,7 +47,7 @@ public abstract class TCFDebugTask<V> extends TCFTask<V> {
if (x instanceof DebugException) throw (DebugException)x;
if (x != null) throw new DebugException(new Status(
IStatus.ERROR, Activator.PLUGIN_ID, DebugException.REQUEST_FAILED,
- "Debugger request failed", x));
+ "Debugger request failed.\n " + x.getMessage(), x));
return getResult();
}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFMemoryBlockRetrieval.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFMemoryBlockRetrieval.java
index 50ea24f59..be5471ca6 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFMemoryBlockRetrieval.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFMemoryBlockRetrieval.java
@@ -34,8 +34,8 @@ import org.eclipse.tcf.protocol.IToken;
import org.eclipse.tcf.protocol.Protocol;
import org.eclipse.tcf.services.IExpressions;
import org.eclipse.tcf.services.IMemory;
-import org.eclipse.tcf.services.ISymbols;
import org.eclipse.tcf.services.IMemory.MemoryError;
+import org.eclipse.tcf.services.ISymbols;
import org.eclipse.tcf.util.TCFDataCache;
/**
@@ -473,7 +473,12 @@ class TCFMemoryBlockRetrieval implements IMemoryBlockRetrievalExtension {
public IMemoryBlockExtension getExtendedMemoryBlock(final String expression, Object context) throws DebugException {
return new TCFDebugTask<IMemoryBlockExtension>() {
public void run() {
- done(new MemoryBlock(expression, -1));
+ if (!exec_ctx.getMemoryContext().validate(this)) return;
+ if (exec_ctx.getMemoryContext().getError() != null) {
+ error(exec_ctx.getMemoryContext().getError());
+ } else {
+ done(new MemoryBlock(expression, -1));
+ }
}
}.getD();
}
@@ -481,7 +486,12 @@ class TCFMemoryBlockRetrieval implements IMemoryBlockRetrievalExtension {
public IMemoryBlock getMemoryBlock(final long address, final long length) throws DebugException {
return new TCFDebugTask<IMemoryBlockExtension>() {
public void run() {
- done(new MemoryBlock("0x" + Long.toHexString(address), length));
+ if (!exec_ctx.getMemoryContext().validate(this)) return;
+ if (exec_ctx.getMemoryContext().getError() != null) {
+ error(exec_ctx.getMemoryContext().getError());
+ } else {
+ done(new MemoryBlock("0x" + Long.toHexString(address), length));
+ }
}
}.getD();
}
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 b37550a91..a350a9208 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
@@ -717,11 +717,14 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
if (!cache.validate(this)) return;
if (cache.getData() != null) {
TCFNodeExecContext ctx = cache.getData();
- o = mem_retrieval.get(ctx.id);
- if (o == null) {
- TCFMemoryBlockRetrieval m = new TCFMemoryBlockRetrieval(ctx);
- mem_retrieval.put(ctx.id, m);
- o = m;
+ if (!ctx.getMemoryContext().validate(this)) return;
+ if (ctx.getMemoryContext().getError() == null) {
+ o = mem_retrieval.get(ctx.id);
+ if (o == null) {
+ TCFMemoryBlockRetrieval m = new TCFMemoryBlockRetrieval(ctx);
+ mem_retrieval.put(ctx.id, m);
+ o = m;
+ }
}
}
}

Back to the top