Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Torregrosa Paez2016-05-11 08:51:30 +0000
committerPablo Torregrosa Paez2016-05-11 08:51:30 +0000
commitb8e5ede0a119b029348849281c70ad22f7e8d132 (patch)
tree48e2e840f81f0e83a95f71ffca5fed597574773b /target_explorer/plugins
parent077911a68758a8103ab5d49d2cc0e8d875158e2a (diff)
downloadorg.eclipse.tcf-b8e5ede0a119b029348849281c70ad22f7e8d132.tar.gz
org.eclipse.tcf-b8e5ede0a119b029348849281c70ad22f7e8d132.tar.xz
org.eclipse.tcf-b8e5ede0a119b029348849281c70ad22f7e8d132.zip
Target Explorer: Fixed remote launch with arguments and prerun script
Change-Id: I690f31997d2314bd34f460d688b754152126f8f1 Signed-off-by: Pablo Torregrosa Paez <pablo.torregrosa@windriver.com>
Diffstat (limited to 'target_explorer/plugins')
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java2
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java5
2 files changed, 5 insertions, 2 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java
index 13588450d..9dc488e90 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TEGdbAbstractLaunchDelegate.java
@@ -200,7 +200,7 @@ public abstract class TEGdbAbstractLaunchDelegate extends GdbLaunchDelegate {
commandEnv = config.getAttribute(ILaunchManager.ATTR_ENVIRONMENT_VARIABLES, (Map<String,String>)null);
if (arguments != null && !arguments.equals("")) { //$NON-NLS-1$
- commandArguments += " " + arguments; //$NON-NLS-1$
+ commandArguments += " " + arguments.replaceAll("\\r", " ").replaceAll("\\n", " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
}
monitor.setTaskName(Messages.TEGdbAbstractLaunchDelegate_starting_program);
}
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java
index f1e4c0610..781725995 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.tcf.launch.cdt/src/org/eclipse/tcf/te/tcf/launch/cdt/launching/TERunLaunchDelegate.java
@@ -58,7 +58,10 @@ public class TERunLaunchDelegate extends AbstractCLaunchDelegate2 {
// 1.1. If there are commands to run before, create a script for them
String remoteExePath = config.getAttribute(IRemoteTEConfigurationConstants.ATTR_REMOTE_PATH, ""); //$NON-NLS-1$
String arguments = getProgramArguments(config);
- String remoteLaunchCommand = remoteExePath.replaceAll("\\r", "") + " " + arguments; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ String remoteLaunchCommand = remoteExePath.replaceAll("\\r", ""); //$NON-NLS-1$ //$NON-NLS-2$
+ if (arguments != null && !arguments.equals("")) { //$NON-NLS-1$
+ remoteLaunchCommand += " " + arguments.replaceAll("\\r", " ").replaceAll("\\n", " "); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
+ }
IPath remotePrerunScriptPath = null;
boolean launchAsRemoteUser = config.getAttribute(IRemoteTEConfigurationConstants.ATTR_LAUNCH_REMOTE_USER, false);
String userId = config.getAttribute(IRemoteTEConfigurationConstants.ATTR_REMOTE_USER_ID, (String)null);

Back to the top