diff --git a/debug/org.eclipse.cdt.debug.mi.core/plugin.xml b/debug/org.eclipse.cdt.debug.mi.core/plugin.xml
index 5f38212bddc..118ec607ac7 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.mi.core/plugin.xml
@@ -11,14 +11,22 @@
id="org.eclipse.cdt.debug.mi.core.CDebuggerNew"
modes="run,core,attach"
name="%GDBMIDebugger.name"
- platform="*"/>
+ platform="*">
+
+
+
+ cpu="native"
+ id="org.eclipse.cdt.debug.mi.core.CygwinCDebugger"
+ modes="run,core,attach"
+ name="%CygwinGDBDebugger.name"
+ platform="win32">
+
+
+
+ pattern="cdt\.managedbuild\.config\.gnu\.mingw\..*">
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
index 3c719764a28..41ff47547d8 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java
@@ -120,14 +120,15 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
ICConfigurationDescription configDesc = projDesc.getActiveConfiguration();
String configId = configDesc.getId();
ICDebugConfiguration[] debugConfigs = CDebugCorePlugin.getDefault().getActiveDebugConfigurations();
- outer: for (int i = 0; i < debugConfigs.length; ++i) {
+ int matchLength = 0;
+ for (int i = 0; i < debugConfigs.length; ++i) {
ICDebugConfiguration dc = debugConfigs[i];
String[] patterns = dc.getSupportedBuildConfigPatterns();
if (patterns != null) {
for (int j = 0; j < patterns.length; ++j) {
- if (configId.matches(patterns[j])) {
+ if (patterns[j].length() > matchLength && configId.matches(patterns[j])) {
debugConfig = dc;
- break outer;
+ matchLength = patterns[j].length();
}
}
}