Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2008-04-12 01:56:34 +0000
committereutarass2008-04-12 01:56:34 +0000
commit190f9fd77f29985d2d662dfe6208f170cf079ea5 (patch)
tree4b6a5efdeddf4e21d71cbfddc3ac2443aa55ff4d /plugins
parente1f388087058d093e8b844c6739e20aec6b0b545 (diff)
downloadorg.eclipse.tcf-190f9fd77f29985d2d662dfe6208f170cf079ea5.tar.gz
org.eclipse.tcf-190f9fd77f29985d2d662dfe6208f170cf079ea5.tar.xz
org.eclipse.tcf-190f9fd77f29985d2d662dfe6208f170cf079ea5.zip
TCF agent: Processes service is implemented for Windows. Now TCF debugger prototype can start and attach a Windows process.
Also fixed: 1. racing in TCFLaunch startup sequence 2. broken channel close notifications in the agent 3. missing command reply arguments in daytime.c example code 4. null pointer exception in TCF/RSE bridge
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFSelfTest.java3
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildren.java5
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java7
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelManager.java8
-rw-r--r--plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java1
-rw-r--r--plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java7
-rw-r--r--plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileResource.java1
7 files changed, 22 insertions, 10 deletions
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFSelfTest.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFSelfTest.java
index 86e1fe85c..6056358e7 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFSelfTest.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/launch/TCFSelfTest.java
@@ -333,8 +333,7 @@ class TCFSelfTest {
assert this.context_id == null;
this.context_id = context_id;
if (pending_cancel != null) {
- Protocol.invokeLater(pending_cancel);
- pending_cancel = null;
+ exit(null);
}
else {
diag.getSymbol(context_id, "tcf_test_func0", this);
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildren.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildren.java
index 12bae4898..3a062ec04 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildren.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFChildren.java
@@ -45,7 +45,10 @@ public abstract class TCFChildren extends TCFDataCache<Map<String,TCFNode>> {
void dispose(String id) {
node_pool.remove(id);
- if (isValid()) getData().remove(id);
+ if (isValid()) {
+ Map<String,TCFNode> map = getData();
+ if (map != null) map.remove(id);
+ }
}
private void flush(Map<String,TCFNode> data) {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
index 8ebb9c1d9..c6281fc05 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModel.java
@@ -295,6 +295,7 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
void onConnected() {
assert Protocol.isDispatchThread();
+ assert launch_node == null;
launch_node = new TCFNodeLaunch(this);
IMemory mem = launch.getService(IMemory.class);
if (mem != null) mem.addListener(mem_listener);
@@ -312,8 +313,10 @@ public class TCFModel implements IElementContentProvider, IElementLabelProvider,
for (int i = 0; i < a.length; i++) {
if (!a[i].isDisposed()) a[i].dispose();
}
- launch_node.makeModelDelta(IModelDelta.STATE | IModelDelta.CONTENT);
- fireModelChanged();
+ if (launch_node != null) {
+ launch_node.makeModelDelta(IModelDelta.STATE | IModelDelta.CONTENT);
+ fireModelChanged();
+ }
}
void onProxyInstalled(final TCFModelProxy p) {
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelManager.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelManager.java
index 4b5f0efee..c337ff1cf 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelManager.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFModelManager.java
@@ -103,9 +103,11 @@ public class TCFModelManager {
if (model == null) {
model = new TCFModel(display, launch);
models.put(launch, model);
- IChannel channel = launch.getChannel();
- if (channel != null && channel.getState() == IChannel.STATE_OPEN) {
- tcf_launch_listener.onConnected(launch);
+ if (!launch.isConnecting()) {
+ IChannel channel = launch.getChannel();
+ if (channel != null && channel.getState() == IChannel.STATE_OPEN) {
+ tcf_launch_listener.onConnected(launch);
+ }
}
}
return model;
diff --git a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
index 3e27e700b..6303b1558 100644
--- a/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
+++ b/plugins/org.eclipse.tm.tcf.debug.ui/src/org/eclipse/tm/internal/tcf/debug/ui/model/TCFNodeExecContext.java
@@ -368,6 +368,7 @@ public class TCFNodeExecContext extends TCFNode {
if (parent instanceof TCFNodeExecContext) {
((TCFNodeExecContext)parent).onChildResumedOrSuspended();
}
+ model.fireModelChanged();
}
});
}
diff --git a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java
index 2f3904935..6bacd0c49 100644
--- a/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java
+++ b/plugins/org.eclipse.tm.tcf.debug/src/org/eclipse/tm/internal/tcf/debug/model/TCFLaunch.java
@@ -118,7 +118,7 @@ public class TCFLaunch extends Launch {
Map<String,String> vars = new HashMap<String,String>();
if (append) vars.putAll(def);
if (env != null) vars.putAll(env);
- ps.start(dir, file, toArgsArray(args), vars, attach, new IProcesses.DoneStart() {
+ ps.start(dir, file, toArgsArray(file, args), vars, attach, new IProcesses.DoneStart() {
public void doneStart(IToken token, Exception error, ProcessContext process) {
if (error != null) {
channel.terminate(error);
@@ -138,10 +138,11 @@ public class TCFLaunch extends Launch {
}
}
- private String[] toArgsArray(String cmd) {
+ private String[] toArgsArray(String file, String cmd) {
int i = 0;
int l = cmd.length();
List<String> arr = new ArrayList<String>();
+ arr.add(file);
for (;;) {
while (i < l && cmd.charAt(i) == ' ') i++;
if (i >= l) break;
@@ -174,6 +175,8 @@ public class TCFLaunch extends Launch {
for (Iterator<Listener> i = listeners.iterator(); i.hasNext();) {
i.next().onDisconnected(this);
}
+ if (error != null) setError(error);
+ else fireChanged();
if (DebugPlugin.getDefault() != null) fireTerminate();
}
diff --git a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileResource.java b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileResource.java
index 563ec50a8..c2cf75ce6 100644
--- a/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileResource.java
+++ b/plugins/org.eclipse.tm.tcf.rse/src/org/eclipse/tm/internal/tcf/rse/files/TCFFileResource.java
@@ -85,6 +85,7 @@ public class TCFFileResource extends AbstractResource implements IHostFile {
}
public synchronized String getParentPath() {
+ if (root) return null;
return toLocalPath(parent);
}

Back to the top