Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 308516
Collapse All | Expand All

(-)src/org/eclipse/cdt/debug/mi/core/GDBCDIDebugger2.java (-4 / +18 lines)
Lines 33-38 Link Here
33
import org.eclipse.core.runtime.IProgressMonitor;
33
import org.eclipse.core.runtime.IProgressMonitor;
34
import org.eclipse.core.runtime.OperationCanceledException;
34
import org.eclipse.core.runtime.OperationCanceledException;
35
import org.eclipse.core.runtime.Path;
35
import org.eclipse.core.runtime.Path;
36
import org.eclipse.core.variables.VariablesPlugin;
36
import org.eclipse.debug.core.ILaunch;
37
import org.eclipse.debug.core.ILaunch;
37
import org.eclipse.debug.core.ILaunchConfiguration;
38
import org.eclipse.debug.core.ILaunchConfiguration;
38
 
39
 
Lines 234-243 Link Here
234
		}
235
		}
235
	}
236
	}
236
237
237
	protected String getWorkingDirectory( ILaunchConfiguration config ) throws CoreException {
238
	protected String getWorkingDirectory( ILaunchConfiguration config ) throws CoreException {		
238
		File cwd = getProjectPath( config ).toFile();
239
		IPath path = null;
239
		CommandFactory factory = getCommandFactory( config );
240
		String location = config.getAttribute(ICDTLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, (String)null);
240
		return factory.getWorkingDirectory(cwd);
241
242
		if (location != null) {
243
			String expandedLocation = VariablesPlugin.getDefault().getStringVariableManager().performStringSubstitution(location);
244
			if (expandedLocation.length() > 0) {
245
				path = new Path(expandedLocation);
246
			}
247
		} 
248
		
249
		if(path == null){
250
			path = getProjectPath( config );
251
		}
252
253
		CommandFactory factory = getCommandFactory( config ); 
254
		return factory.getWorkingDirectory(path.toFile());
241
	}
255
	}
242
256
243
	protected String getCommandFile( ILaunchConfiguration config ) throws CoreException {
257
	protected String getCommandFile( ILaunchConfiguration config ) throws CoreException {

Return to bug 308516