1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

[264731] More specific GDB version checking until GDB 7.0 is released

This commit is contained in:
Marc Khouzam 2009-02-12 18:56:32 +00:00
parent b80da27364
commit 4399ebb4e9

View file

@ -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);