Skip to main content
summaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorDoug Schaefer2017-10-17 15:35:03 +0000
committerDoug Schaefer2017-10-17 15:35:03 +0000
commit736d7b59550dcb1a20ab68020bd030cc4d7b086e (patch)
tree86f810f1a5558bb6da1609ab1868d216bdd6e8c4 /debug
parent2198597a98741dfc9c9a7cf574f7b7e75be4d269 (diff)
downloadorg.eclipse.cdt-736d7b59550dcb1a20ab68020bd030cc4d7b086e.tar.gz
org.eclipse.cdt-736d7b59550dcb1a20ab68020bd030cc4d7b086e.tar.xz
org.eclipse.cdt-736d7b59550dcb1a20ab68020bd030cc4d7b086e.zip
Make Qt toolchain selection more resilient.
On my Windows box I have lots of GCC toolchains. Make sure it selects the one from the Qt install. And fix a few NPEs and things around that. Change-Id: Ifeeca9271b5055ac773b3b77e372a67e07305130
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchConfigDelegate.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchConfigDelegate.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchConfigDelegate.java
index 0a3ef900b37..ea940bfadf2 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchConfigDelegate.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/launch/CoreBuildLaunchConfigDelegate.java
@@ -81,14 +81,16 @@ public abstract class CoreBuildLaunchConfigDelegate extends LaunchConfigurationT
// Pick the first one that matches
Map<String, String> properties = new HashMap<>();
properties.putAll(target.getAttributes());
- Collection<IToolChain> tcs = toolChainManager.getToolChainsMatching(properties);
- if (!tcs.isEmpty()) {
- IToolChain toolChain = tcs.iterator().next();
- return configManager.getBuildConfiguration(project, toolChain, mode, monitor);
+ for (IToolChain toolChain : toolChainManager.getToolChainsMatching(properties)) {
+ ICBuildConfiguration buildConfig = configManager.getBuildConfiguration(project, toolChain, mode, monitor);
+ if (buildConfig != null) {
+ return buildConfig;
+ }
}
return null;
}
+
protected IBinary getBinary(ICBuildConfiguration buildConfig) throws CoreException {
IBinary[] binaries = buildConfig.getBuildOutput();
IBinary exeFile = null;

Back to the top