Skip to main content
summaryrefslogtreecommitdiffstats
path: root/gcov
diff options
context:
space:
mode:
authorXavier Raynaud2013-08-05 14:04:45 +0000
committerJeff Johnston2013-08-09 17:26:47 +0000
commitb17b5f68ff41ba54794bfe5451e1ab4bbb8f2640 (patch)
tree93c9f9f4287234e3fcbcd4d7e8148a39f4db2979 /gcov
parent300601c85a2a0dbe3e887e6fed3c4e76a5fe34ec (diff)
downloadorg.eclipse.linuxtools-b17b5f68ff41ba54794bfe5451e1ab4bbb8f2640.tar.gz
org.eclipse.linuxtools-b17b5f68ff41ba54794bfe5451e1ab4bbb8f2640.tar.xz
org.eclipse.linuxtools-b17b5f68ff41ba54794bfe5451e1ab4bbb8f2640.zip
fix #414417 (Gcov working directory setting is not recognized)
Change-Id: Iecb728e5d27b362fb483f9f6a8957c8e4c530b45 Reviewed-on: https://git.eclipse.org/r/15138 Tested-by: Hudson CI Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> IP-Clean: Jeff Johnston <jjohnstn@redhat.com> Tested-by: Jeff Johnston <jjohnstn@redhat.com>
Diffstat (limited to 'gcov')
-rw-r--r--gcov/org.eclipse.linuxtools.gcov.launch/src/org/eclipse/linuxtools/internal/gcov/launch/GcovLaunchConfigurationDelegate.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcov/org.eclipse.linuxtools.gcov.launch/src/org/eclipse/linuxtools/internal/gcov/launch/GcovLaunchConfigurationDelegate.java b/gcov/org.eclipse.linuxtools.gcov.launch/src/org/eclipse/linuxtools/internal/gcov/launch/GcovLaunchConfigurationDelegate.java
index f9b745c09c..a4c75f79c0 100644
--- a/gcov/org.eclipse.linuxtools.gcov.launch/src/org/eclipse/linuxtools/internal/gcov/launch/GcovLaunchConfigurationDelegate.java
+++ b/gcov/org.eclipse.linuxtools.gcov.launch/src/org/eclipse/linuxtools/internal/gcov/launch/GcovLaunchConfigurationDelegate.java
@@ -15,6 +15,7 @@
*******************************************************************************/
package org.eclipse.linuxtools.internal.gcov.launch;
+import java.io.File;
import java.net.URI;
import java.util.List;
@@ -54,15 +55,17 @@ public class GcovLaunchConfigurationDelegate extends ProfileLaunchConfigurationD
//set up and launch the local c/c++ program
IRemoteCommandLauncher launcher = RemoteProxyManager.getInstance().getLauncher(getProject());
- URI workingDirURI = getProject().getLocationURI();
- IPath workingDirPath = new Path(workingDirURI.getPath());
+ File workDir = getWorkingDirectory(config);
+ if (workDir == null) {
+ workDir = new File(System.getProperty("user.home", ".")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
String arguments[] = getProgramArgumentsArray( config );
//add a listener for termination of the launch
ILaunchManager lmgr = DebugPlugin.getDefault().getLaunchManager();
lmgr.addLaunchListener(new LaunchTerminationWatcher(launch, exePath));
- Process process = launcher.execute(exePath, arguments, getEnvironment(config), workingDirPath, monitor);
+ Process process = launcher.execute(exePath, arguments, getEnvironment(config), new Path(workDir.getAbsolutePath()), monitor);
DebugPlugin.newProcess( launch, process, renderProcessLabel( exePath.toOSString() ) );

Back to the top