Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Khouzam2015-09-02 14:47:27 +0000
committerGerrit Code Review @ Eclipse.org2015-09-04 01:00:54 +0000
commit6272b4e523c97678ef29afd8747ba4bdb8f44338 (patch)
tree9ab7e4f311209a02b1ab87d0276589ec2ba9c6a7 /dsf-gdb/org.eclipse.cdt.examples.dsf.gdb
parent40ff5f2a668fc029ec2220a44bdb45f3a79bce2b (diff)
downloadorg.eclipse.cdt-6272b4e523c97678ef29afd8747ba4bdb8f44338.tar.gz
org.eclipse.cdt-6272b4e523c97678ef29afd8747ba4bdb8f44338.tar.xz
org.eclipse.cdt-6272b4e523c97678ef29afd8747ba4bdb8f44338.zip
Bug 476432 - GDB version comparison fails for GDB 7.10
Change-Id: I51366e45deabda29a1a5b00166039bad14a146f8 Signed-off-by: Marc Khouzam <marc.khouzam@ericsson.com>
Diffstat (limited to 'dsf-gdb/org.eclipse.cdt.examples.dsf.gdb')
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/GdbExtendedDebugServicesFactory.java10
-rw-r--r--dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/GdbExtendedDebugServicesFactoryNS.java4
2 files changed, 7 insertions, 7 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/GdbExtendedDebugServicesFactory.java b/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/GdbExtendedDebugServicesFactory.java
index 1602267523a..d92325900b5 100644
--- a/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/GdbExtendedDebugServicesFactory.java
+++ b/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/GdbExtendedDebugServicesFactory.java
@@ -38,19 +38,19 @@ public class GdbExtendedDebugServicesFactory extends GdbDebugServicesFactory {
@Override
protected ICommandControl createCommandControl(DsfSession session, ILaunchConfiguration config) {
- if (GDB_7_7_VERSION.compareTo(getVersion()) <= 0) {
+ if (compareVersionWith(GDB_7_7_VERSION) >= 0) {
return new GDBExtendedControl(session, config, new GdbExtendedCommandFactory_6_8());
}
- if (GDB_7_4_VERSION.compareTo(getVersion()) <= 0) {
+ if (compareVersionWith(GDB_7_4_VERSION) >= 0) {
return new GDBControl_7_4(session, config, new GdbExtendedCommandFactory_6_8());
}
- if (GDB_7_2_VERSION.compareTo(getVersion()) <= 0) {
+ if (compareVersionWith(GDB_7_2_VERSION) >= 0) {
return new GDBControl_7_2(session, config, new GdbExtendedCommandFactory_6_8());
}
- if (GDB_7_0_VERSION.compareTo(getVersion()) <= 0) {
+ if (compareVersionWith(GDB_7_0_VERSION) >= 0) {
return new GDBControl_7_0(session, config, new GdbExtendedCommandFactory_6_8());
}
- if (GDB_6_8_VERSION.compareTo(getVersion()) <= 0) {
+ if (compareVersionWith(GDB_6_8_VERSION) >= 0) {
return new GDBControl(session, config, new GdbExtendedCommandFactory_6_8());
}
return new GDBControl(session, config, new CommandFactory());
diff --git a/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/GdbExtendedDebugServicesFactoryNS.java b/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/GdbExtendedDebugServicesFactoryNS.java
index 6e732d83e42..a4c12aa3f1a 100644
--- a/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/GdbExtendedDebugServicesFactoryNS.java
+++ b/dsf-gdb/org.eclipse.cdt.examples.dsf.gdb/src/org/eclipse/cdt/examples/dsf/gdb/service/GdbExtendedDebugServicesFactoryNS.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2014 Ericsson and others.
+ * Copyright (c) 2014, 2015 Ericsson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -23,7 +23,7 @@ public class GdbExtendedDebugServicesFactoryNS extends GdbExtendedDebugServicesF
@Override
protected IRunControl createRunControlService(DsfSession session) {
- if (GDB_7_2_VERSION.compareTo(getVersion()) <= 0) {
+ if (compareVersionWith(GDB_7_2_VERSION) >= 0) {
return new GDBRunControl_7_2_NS(session);
}
return new GDBRunControl_7_0_NS(session);

Back to the top