diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCDILaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCDILaunchDelegate.java index 46fb0bb9faf..4eec223a4ef 100644 --- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCDILaunchDelegate.java +++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/LocalCDILaunchDelegate.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2008 QNX Software Systems and others. + * Copyright (c) 2004, 2009 QNX Software Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ * Contributors: * QNX Software Systems - Initial API and implementation * Anton Leherbauer (Wind River Systems) - bugs 205108, 212632, 224187 + * Ken Ryall (Nokia) - bug 188116 *******************************************************************************/ package org.eclipse.cdt.launch.internal; @@ -472,4 +473,14 @@ public class LocalCDILaunchDelegate extends AbstractCLaunchDelegate { session = launchOldDebugSession( config, launch, debugger, monitor ); return session; } + + @Override + public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException { + // Never build for attach. Bug 188116 + String debugMode = configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, ICDTLaunchConfigurationConstants.DEBUGGER_MODE_RUN ); + if (debugMode.equals( ICDTLaunchConfigurationConstants.DEBUGGER_MODE_ATTACH )) + return false; + + return super.buildForLaunch(configuration, mode, monitor); + } }