Skip to main content
summaryrefslogtreecommitdiffstats
path: root/launch
diff options
context:
space:
mode:
authorDoug Schaefer2007-08-28 20:38:03 +0000
committerDoug Schaefer2007-08-28 20:38:03 +0000
commita00f0ded40737be55e0c54d6aee369d2f3f7bbce (patch)
tree8dee1cbd9fb5ec436e2e50edb2f6ac0311fe4842 /launch
parent48c59df30611e38ebdaca7e5b0083e08cd9a42e2 (diff)
downloadorg.eclipse.cdt-a00f0ded40737be55e0c54d6aee369d2f3f7bbce.tar.gz
org.eclipse.cdt-a00f0ded40737be55e0c54d6aee369d2f3f7bbce.tar.xz
org.eclipse.cdt-a00f0ded40737be55e0c54d6aee369d2f3f7bbce.zip
Bug 196002 - Set up the mapping from the gdb/mi debugger to the gnu toolchain. Also map the cygwin debugger to the cygwin toolchain. Fix up the launch shortcut so that the longest matching pattern wins the day since both cygwin and mingw would get trumped by the main gnu one. With this single click debug works on Linux.
Diffstat (limited to 'launch')
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/internal/CApplicationLaunchShortcut.java7
1 files changed, 4 insertions, 3 deletions
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();
}
}
}

Back to the top