Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlvaro Sanchez-Leon2016-05-02 17:23:09 +0000
committerGerrit Code Review @ Eclipse.org2016-05-03 14:50:35 +0000
commitee48887d9d3e946ba892b7f9618257fe31b929dd (patch)
tree9aa3935db57ac8c827b1ce660e3248e80a003878
parent08d975066c740c86bf40a204a55f1b5a05600900 (diff)
downloadorg.eclipse.cdt-ee48887d9d3e946ba892b7f9618257fe31b929dd.tar.gz
org.eclipse.cdt-ee48887d9d3e946ba892b7f9618257fe31b929dd.tar.xz
org.eclipse.cdt-ee48887d9d3e946ba892b7f9618257fe31b929dd.zip
Bug 489750: [Standalone] does not set working directory of the target
process correctly Change-Id: Ia6d9f1ee64b573d2cba3bba780c2b8c90fe0757d Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com>
-rw-r--r--debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/internal/debug/application/DebugExecutable.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/internal/debug/application/DebugExecutable.java b/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/internal/debug/application/DebugExecutable.java
index 2ca1f22a963..7299e4307cf 100644
--- a/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/internal/debug/application/DebugExecutable.java
+++ b/debug/org.eclipse.cdt.debug.application/src/org/eclipse/cdt/internal/debug/application/DebugExecutable.java
@@ -296,10 +296,15 @@ public class DebugExecutable {
wc.setAttribute(
ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
(String) null);
- if (arguments != null)
- wc.setAttribute(
- ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS,
- arguments);
+
+ if (arguments != null) {
+ wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, arguments);
+ }
+
+ // Use the PWD as the working directory for the application being launched
+ wc.setAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
+ System.getProperty("user.dir")); //$NON-NLS-1$
+
if (save) {
config = wc.doSave();
} else {

Back to the top