mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-09 09:15:38 +02:00
[264731] More specific GDB version checking until GDB 7.0 is released
This commit is contained in:
parent
b80da27364
commit
4399ebb4e9
1 changed files with 9 additions and 3 deletions
|
@ -41,6 +41,9 @@ import org.eclipse.debug.core.ILaunchConfiguration;
|
||||||
|
|
||||||
public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
|
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;
|
private final String fVersion;
|
||||||
|
|
||||||
public GdbDebugServicesFactory(String version) {
|
public GdbDebugServicesFactory(String version) {
|
||||||
|
@ -84,7 +87,7 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ICommandControl createCommandControl(DsfSession session, ILaunchConfiguration config) {
|
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_7_0(session, config);
|
||||||
}
|
}
|
||||||
return new GDBControl(session, config);
|
return new GDBControl(session, config);
|
||||||
|
@ -106,7 +109,7 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected IMemory createMemoryService(DsfSession session) {
|
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);
|
return new GDBMemory_7_0(session);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,6 +123,9 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected IProcesses createProcessesService(DsfSession session) {
|
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$
|
if (fVersion.startsWith("6.8.50.20081118")) { //$NON-NLS-1$
|
||||||
return new GDBProcesses_7_0(session);
|
return new GDBProcesses_7_0(session);
|
||||||
}
|
}
|
||||||
|
@ -133,7 +139,7 @@ public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected IRunControl createRunControlService(DsfSession session) {
|
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_7_0(session);
|
||||||
}
|
}
|
||||||
return new GDBRunControl(session);
|
return new GDBRunControl(session);
|
||||||
|
|
Loading…
Add table
Reference in a new issue