From 4399ebb4e92cbe071ad0f2d48b39c7f694df6451 Mon Sep 17 00:00:00 2001 From: Marc Khouzam Date: Thu, 12 Feb 2009 18:56:32 +0000 Subject: [PATCH] [264731] More specific GDB version checking until GDB 7.0 is released --- .../cdt/dsf/gdb/service/GdbDebugServicesFactory.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactory.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactory.java index 5a7a31c0e7f..32c33595517 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactory.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactory.java @@ -41,6 +41,9 @@ import org.eclipse.debug.core.ILaunchConfiguration; public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory { + // This should eventually be "7.0" once GDB 7.0 is released + private static final String GDB_7_0_VERSION = "6.8.50.20081118"; //$NON-NLS-1$ + private final String fVersion; public GdbDebugServicesFactory(String version) { @@ -84,7 +87,7 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory { } protected ICommandControl createCommandControl(DsfSession session, ILaunchConfiguration config) { - if ("6.8".compareTo(fVersion) < 0) { //$NON-NLS-1$ + if (GDB_7_0_VERSION.compareTo(fVersion) <= 0) { return new GDBControl_7_0(session, config); } return new GDBControl(session, config); @@ -106,7 +109,7 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory { @Override protected IMemory createMemoryService(DsfSession session) { - if ("6.8".compareTo(fVersion) < 0) { //$NON-NLS-1$ + if (GDB_7_0_VERSION.compareTo(fVersion) <= 0) { return new GDBMemory_7_0(session); } @@ -120,6 +123,9 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory { @Override protected IProcesses createProcessesService(DsfSession session) { + // Multi-process is not part of GDB HEAD yet, + // but is part of this very specific build. + // We'll need to change this when 7.0 is ready if (fVersion.startsWith("6.8.50.20081118")) { //$NON-NLS-1$ return new GDBProcesses_7_0(session); } @@ -133,7 +139,7 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory { @Override protected IRunControl createRunControlService(DsfSession session) { - if ("6.8".compareTo(fVersion) < 0) { //$NON-NLS-1$ + if (GDB_7_0_VERSION.compareTo(fVersion) <= 0) { return new GDBRunControl_7_0(session); } return new GDBRunControl(session);