diff options
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.debug')
2 files changed, 29 insertions, 3 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 58d7075bd..5b1cdb6c2 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 @@ -40,9 +40,11 @@ class TestExpressions implements ITCFTest, private String bp_id; private boolean bp_ok; private IDiagnostics.ISymbol sym_func3; + private String test_ctx_id; private String process_id; private String thread_id; private boolean test_done; + private IRunControl.RunControlContext test_ctx; private IRunControl.RunControlContext thread_ctx; private String suspended_pc; private boolean waiting_suspend; @@ -181,14 +183,35 @@ class TestExpressions implements ITCFTest, }); return; } - if (process_id == null) { + if (test_ctx_id == null) { diag.runTest("RCBP1", new IDiagnostics.DoneRunTest() { public void doneRunTest(IToken token, Throwable error, String id) { if (error != null) { exit(error); } else { - process_id = id; + test_ctx_id = id; + runTest(); + } + } + }); + return; + } + if (test_ctx == null) { + rc.getContext(test_ctx_id, new IRunControl.DoneGetContext() { + public void doneGetContext(IToken token, Exception error, IRunControl.RunControlContext ctx) { + if (error != null) { + exit(error); + } + else if (ctx == null) { + exit(new Exception("Invalid test execution context")); + } + else { + test_ctx = ctx; + process_id = test_ctx.getProcessID(); + if (!process_id.equals(test_ctx_id)) { + thread_id = test_ctx_id; + } runTest(); } } @@ -204,6 +227,9 @@ class TestExpressions implements ITCFTest, else if (ids == null || ids.length == 0) { exit(new Exception("Test process has no threads")); } + else if (ids.length != 1) { + exit(new Exception("Test process has too many threads")); + } else { thread_id = ids[0]; runTest(); 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 a3a2e87ec..41217f293 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 @@ -714,7 +714,7 @@ class TestRCBP1 implements ITCFTest, if (!context_id.equals(mem_ctx.getID())) { exit(new Exception("Bad memory context data: invalid ID")); } - Object pid = context.getProperties().get(IRunControl.PROP_PROCESS_ID); + Object pid = context.getProcessID(); if (pid != null && !pid.equals(mem_ctx.getProcessID())) { exit(new Exception("Bad memory context data: invalid ProcessID")); } |