diff -r c8f736b04bf4 -r 54d4f01c8389 debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/NokiaAbstractLaunchDelegate.java --- a/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/NokiaAbstractLaunchDelegate.java Mon Aug 30 20:19:48 2010 -0500 +++ b/debuggercdi/com.nokia.cdt.debug.launch/src/com/nokia/cdt/internal/debug/launch/NokiaAbstractLaunchDelegate.java Mon Aug 30 21:48:01 2010 -0500 @@ -23,7 +23,6 @@ import java.util.Date; import java.util.LinkedList; import java.util.List; -import java.util.StringTokenizer; import org.eclipse.cdt.core.model.CModelException; import org.eclipse.cdt.core.model.IBinary; @@ -36,10 +35,7 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.SubProgressMonitor; -import org.eclipse.core.runtime.jobs.IJobManager; -import org.eclipse.core.runtime.jobs.Job; import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.jface.dialogs.MessageDialog; @@ -209,49 +205,19 @@ */ protected IPath[] getOtherExecutables(ICProject project, IPath exePath, ILaunchConfiguration config, IProgressMonitor monitor) throws CModelException { - ArrayList targetedBinaries = new ArrayList(); - targetedBinaries.addAll(getBldInfExecutables(project, exePath, config, monitor)); - return (IPath[]) targetedBinaries.toArray(new IPath[targetedBinaries - .size()]); - } - - /** - * Returns list of executables that are built as part of the bld inf file. - * Excludes the exe specified in the launch configuration. - * @param monitor - * - * @return - */ - protected List getBldInfExecutables(ICProject project, - IPath mainExePath, ILaunchConfiguration config, IProgressMonitor monitor) { - // Target imported executables in the project - ArrayList infExecutables = new ArrayList(); - + List targetedBinaries = new ArrayList(); + try { - - String executablesToTarget = ExecutablesTab.getExecutablesToTarget(config, monitor); + targetedBinaries.addAll(ExecutablesTab.getExecutablesToTarget(config, monitor)); - if (executablesToTarget.length() > 0) { - StringTokenizer tokenizer = new StringTokenizer(executablesToTarget, - ","); //$NON-NLS-1$ - while (tokenizer.hasMoreTokens()) { - String exe = tokenizer.nextToken(); - String enabled = tokenizer.nextToken(); - - Path exePath = new Path(exe); - if (enabled.compareTo("0") == 0 //$NON-NLS-1$ - || exePath.lastSegment().equalsIgnoreCase( - mainExePath.lastSegment())) { - continue; - } - infExecutables.add(exePath); - } + // remove the main exe if it exists + if (targetedBinaries.contains(exePath)) { + targetedBinaries.remove(exePath); } - } catch (CoreException ce) { - return infExecutables; + } catch (CoreException e) { } - return infExecutables; + return (IPath[]) targetedBinaries.toArray(new IPath[targetedBinaries.size()]); } /**