Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Fletcher2006-08-04 17:51:18 +0000
committerThomas Fletcher2006-08-04 17:51:18 +0000
commitaf47333e0448535f5655481c238ecc4e1a5fb05f (patch)
tree19895e743887604cd18fb15b96126b090b423416 /debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse
parentb2b00e4be11f1d8fb52f825363b2924a0bac0410 (diff)
downloadorg.eclipse.cdt-af47333e0448535f5655481c238ecc4e1a5fb05f.tar.gz
org.eclipse.cdt-af47333e0448535f5655481c238ecc4e1a5fb05f.tar.xz
org.eclipse.cdt-af47333e0448535f5655481c238ecc4e1a5fb05f.zip
Fix to be more tolerant of changes in the debugger ids that can result
from shared launch configurations. PR 144758
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/StandardGDBDebuggerPage.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/StandardGDBDebuggerPage.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/StandardGDBDebuggerPage.java
index 8c1ed76626e..60ddc8f2dc3 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/StandardGDBDebuggerPage.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/StandardGDBDebuggerPage.java
@@ -137,10 +137,19 @@ public class StandardGDBDebuggerPage extends AbstractCDebuggerPage implements Ob
index = i;
}
fCommandFactoryCombo.setItems( descLabels );
- if ( index < 0 )
+ if ( index < 0 ) {
index = 0;
- fCommandFactoryCombo.select( index );
- String[] miVersions = fCommandFactoryDescriptors[index].getMIVersions();
+ }
+
+ //It may be the case that we can't match up any identifier with any installed debuggers associated
+ //with this debuggerID (ie fCommandFactoryDescriptors.length == 0) for example when importing a
+ //launch from different environments that use CDT debugging. In this case we try and soldier on
+ //using the defaults as much as is realistic.
+ String[] miVersions = new String[0];
+ if(index < fCommandFactoryDescriptors.length) {
+ fCommandFactoryCombo.select( index );
+ miVersions = fCommandFactoryDescriptors[index].getMIVersions();
+ }
fProtocolCombo.setItems( miVersions );
if ( miVersions.length == 0 ) {
miVersions = new String[] { DEFAULT_MI_VERSION };

Back to the top