Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2010-05-06 18:40:48 -0400
committereutarass2010-05-06 18:40:48 -0400
commit044af5804c5b4d28036bb7a8f602dfe77c99f390 (patch)
treee100a7bbfae45e4bef5b625c52c5df96479a4c58 /plugins/org.eclipse.tm.tcf.debug
parent9c38a012cd770e765f922e8b989606f97f08d603 (diff)
downloadorg.eclipse.tcf-044af5804c5b4d28036bb7a8f602dfe77c99f390.tar.gz
org.eclipse.tcf-044af5804c5b4d28036bb7a8f602dfe77c99f390.tar.xz
org.eclipse.tcf-044af5804c5b4d28036bb7a8f602dfe77c99f390.zip
TCF Agent: fixed: diagnostics fail if the agent is built without Symbols service
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java16
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java15
2 files changed, 23 insertions, 8 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java
index 5b1cdb6c2..5068c2e73 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestExpressions.java
@@ -135,7 +135,7 @@ class TestExpressions implements ITCFTest,
exit(null);
}
else {
- exit(new Error("Missing 'contextRemoved' event for " + process_id));
+ exit(new Error("Missing 'contextRemoved' event for " + test_ctx_id));
}
}
});
@@ -371,16 +371,16 @@ class TestExpressions implements ITCFTest,
return;
}
}
- for (final String id : test_expressions) {
- if (local_vars.length == 0 && id.indexOf("local") >= 0) continue;
- if (expr_ctx.get(id) == null) {
- expr.create(stack_trace[stack_trace.length - 2], null, id, new IExpressions.DoneCreate() {
+ for (final String txt : test_expressions) {
+ if (local_vars.length == 0 && txt.indexOf("local") >= 0) continue;
+ if (expr_ctx.get(txt) == null) {
+ expr.create(stack_trace[stack_trace.length - 2], null, txt, new IExpressions.DoneCreate() {
public void doneCreate(IToken token, Exception error, IExpressions.Expression ctx) {
if (error != null) {
exit(error);
}
else {
- expr_ctx.put(id, ctx);
+ expr_ctx.put(txt, ctx);
runTest();
}
}
@@ -470,7 +470,7 @@ class TestExpressions implements ITCFTest,
}
}
test_done = true;
- diag.cancelTest(process_id, new IDiagnostics.DoneCancelTest() {
+ diag.cancelTest(test_ctx_id, new IDiagnostics.DoneCancelTest() {
public void doneCancelTest(IToken token, Throwable error) {
if (error != null) exit(error);
}
@@ -518,7 +518,7 @@ class TestExpressions implements ITCFTest,
public void contextRemoved(String[] context_ids) {
for (String id : context_ids) {
ctx_map.remove(id);
- if (id.equals(process_id)) {
+ if (id.equals(test_ctx_id)) {
if (test_done) {
bp.set(null, new IBreakpoints.DoneCommand() {
public void doneCommand(IToken token, Exception error) {
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java
index 460d633b3..62eec90e4 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/tests/TestRCBP1.java
@@ -12,6 +12,7 @@ package org.eclipse.tm.internal.tcf.debug.tests;
import java.math.BigInteger;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -91,7 +92,21 @@ class TestRCBP1 implements ITCFTest,
private final IBreakpoints.BreakpointsListener bp_listener = new IBreakpoints.BreakpointsListener() {
+ @SuppressWarnings("unchecked")
public void breakpointStatusChanged(String id, Map<String,Object> status) {
+ if (bp_list.get(id) != null && context_id != null) {
+ String s = (String)status.get(IBreakpoints.STATUS_ERROR);
+ if (s != null) exit(new Exception("Invalid BP status: " + s));
+ Collection<Map<String,Object>> list = (Collection<Map<String,Object>>)status.get(IBreakpoints.STATUS_INSTANCES);
+ if (list == null) return;
+ String err = null;
+ for (Map<String,Object> map : list) {
+ String ctx = (String)map.get(IBreakpoints.INSTANCE_CONTEXT);
+ if (context_id.equals(ctx) && map.get(IBreakpoints.INSTANCE_ERROR) != null)
+ err = (String)map.get(IBreakpoints.INSTANCE_ERROR);
+ }
+ if (err != null) exit(new Exception("Invalid BP status: " + err));
+ }
}
public void contextAdded(Map<String,Object>[] bps) {

Back to the top