Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2011-02-02 18:56:33 +0000
committereutarass2011-02-02 18:56:33 +0000
commit7ec5db245f3adbd1dec429e193d80859fc6dd2ac (patch)
tree16c051b3862af68817337bd33efb544b16f09df9 /plugins/org.eclipse.tm.tcf.core
parent9b9082b3a4b1e7413d17529adc0d324d99785f76 (diff)
downloadorg.eclipse.tcf-7ec5db245f3adbd1dec429e193d80859fc6dd2ac.tar.gz
org.eclipse.tcf-7ec5db245f3adbd1dec429e193d80859fc6dd2ac.tar.xz
org.eclipse.tcf-7ec5db245f3adbd1dec429e193d80859fc6dd2ac.zip
1. Added code, API and UI to control auto-attach of process children.
2. Added code, API and UI to control usage of pseudo-terminals for process standard I/O. 3. Fixed: memory map on Linux is missing BSS segments.
Diffstat (limited to 'plugins/org.eclipse.tm.tcf.core')
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java20
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemoryMap.java5
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java27
3 files changed, 51 insertions, 1 deletions
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java
index 4eff1dcfb..662a3b115 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/internal/tcf/services/remote/ProcessesProxy.java
@@ -213,6 +213,26 @@ public class ProcessesProxy implements IProcesses {
}.token;
}
+ public IToken start(String directory, String file,
+ String[] command_line, Map<String,String> environment,
+ Map<String,Object> params, final DoneStart done) {
+ return new Command(channel, this,
+ "start", new Object[]{ directory, file, command_line,
+ toEnvStringArray(environment), params }) {
+ @SuppressWarnings("unchecked")
+ @Override
+ public void done(Exception error, Object[] args) {
+ ProcessContext ctx = null;
+ if (error == null) {
+ assert args.length == 2;
+ error = toError(args[0]);
+ if (args[1] != null) ctx = new ProcessContext((Map<String,Object>)args[1]);
+ }
+ done.doneStart(token, error, ctx);
+ }
+ }.token;
+ }
+
public IToken getSignalList(String context_id, final DoneGetSignalList done) {
return new Command(channel, ProcessesProxy.this,
"getSignalList", new Object[]{ context_id }) {
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemoryMap.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemoryMap.java
index 0970c1f34..646595eea 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemoryMap.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IMemoryMap.java
@@ -35,7 +35,10 @@ public interface IMemoryMap extends IService {
/** Number, region offset in the file */
PROP_OFFSET = "Offs",
- /** Number, region flags, see FLAG_* */
+ /** Boolean, true if the region represents BSS */
+ PROP_BSS = "BSS",
+
+ /** Number, region memory protection flags, see FLAG_* */
PROP_FLAGS = "Flags",
/** String, name of the file */
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java
index b0b40eda5..a8dd7a449 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/services/IProcesses.java
@@ -32,6 +32,15 @@ public interface IProcesses extends IService {
static final String NAME = "Processes";
+ /** Process start parameters */
+ static final String
+ /** Boolean, attach the debugger to the process */
+ START_ATTACH = "Attach",
+ /** Boolean, auto-attach process children */
+ START_ATTACH_CHILDREN = "AttachChildren",
+ /** Boolean, Use pseudo-terminal for the process standard I/O */
+ START_USE_TERMINAL = "UseTerminal";
+
/**
* Retrieve context info for given context ID.
* A context corresponds to an execution thread, process, address space, etc.
@@ -283,12 +292,30 @@ public interface IProcesses extends IService {
* @param attach - if true debugger should be attached to the process.
* @param done - call back interface called when operation is completed.
* @return pending command handle, can be used to cancel the command.
+ * @deprecated Use "Map<String,Object> params" instead of "boolean attach".
*/
IToken start(String directory, String file,
String[] command_line, Map<String,String> environment,
boolean attach, DoneStart done);
/**
+ * Start a new process on remote machine.
+ * @param directory - initial value of working directory for the process.
+ * @param file - process image file.
+ * @param command_line - command line arguments for the process.
+ * Note: the service does NOT add image file name as first argument for the process.
+ * If a client wants first parameter to be the file name, it should add it itself.
+ * @param environment - map of environment variables for the process,
+ * if null then default set of environment variables will be used.
+ * @param params - additional process start parameters, see START_*.
+ * @param done - call back interface called when operation is completed.
+ * @return pending command handle, can be used to cancel the command.
+ */
+ IToken start(String directory, String file,
+ String[] command_line, Map<String,String> environment,
+ Map<String,Object> params, DoneStart done);
+
+ /**
* Call-back interface to be called when "start" command is complete.
*/
interface DoneStart {

Back to the top