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 263689 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/cdt/dsf/mi/service/command/commands/macos/MacOSMIEnvironmentCD.java (-1 / +15 lines)
Lines 16-22 Link Here
16
16
17
public class MacOSMIEnvironmentCD extends MIEnvironmentCD {
17
public class MacOSMIEnvironmentCD extends MIEnvironmentCD {
18
18
19
	// We need to send the following format:
20
	//	-environment-cd "\"/path/without/any/spaces\"" or -environment-cd /path/without/any/spaces
21
	//	-environment-cd "\"/path/with spaces\""
19
	public MacOSMIEnvironmentCD(ICommandControlDMContext ctx, String path) {
22
	public MacOSMIEnvironmentCD(ICommandControlDMContext ctx, String path) {
20
		super(ctx, '\"' + path + '\"');
23
		super(ctx, (path == null) ? null : "\"\\\"" + path + "\\\"\""); //$NON-NLS-1$ //$NON-NLS-2$
24
	}
25
	
26
	@Override
27
	protected String parametersToString() {
28
		// Apple's GDB is very picky.  We override the parameter formatting
29
		// so that we can control exactly what will be sent to GDB.
30
		StringBuffer buffer = new StringBuffer();
31
		for (String parameter : getParameters()) {
32
			buffer.append(' ').append(parameter);
33
		}
34
		return buffer.toString().trim();	
21
	}
35
	}
22
}
36
}

Return to bug 263689