|
Lines 56-62
Link Here
|
| 56 |
implements ILaunchConfigurationDelegate2 |
56 |
implements ILaunchConfigurationDelegate2 |
| 57 |
{ |
57 |
{ |
| 58 |
public final static String GDB_DEBUG_MODEL_ID = "org.eclipse.dd.gdb"; //$NON-NLS-1$ |
58 |
public final static String GDB_DEBUG_MODEL_ID = "org.eclipse.dd.gdb"; //$NON-NLS-1$ |
| 59 |
|
59 |
|
|
|
60 |
private final static String NON_STOP_FIRST_VERSION = "6.8.50"; //$NON-NLS-1$ |
| 60 |
private boolean isNonStopSession = false; |
61 |
private boolean isNonStopSession = false; |
| 61 |
|
62 |
|
| 62 |
public void launch( ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor ) throws CoreException { |
63 |
public void launch( ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor ) throws CoreException { |
|
Lines 107-114
Link Here
|
| 107 |
|
108 |
|
| 108 |
monitor.worked( 1 ); |
109 |
monitor.worked( 1 ); |
| 109 |
|
110 |
|
| 110 |
launch.setServiceFactory(newServiceFactory(LaunchUtils.getGDBVersion(config))); |
111 |
String gdbVersion = LaunchUtils.getGDBVersion(config); |
| 111 |
|
112 |
|
|
|
113 |
// First make sure non-stop is supported, if the user want to use this mode |
| 114 |
if (isNonStopSession && !isNonStopSupported(gdbVersion)) { |
| 115 |
throw new DebugException(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, DebugException.REQUEST_FAILED, "Non-stop mode is only supported starting with GDB " + NON_STOP_FIRST_VERSION, null)); //$NON-NLS-1$ |
| 116 |
} |
| 117 |
|
| 118 |
launch.setServiceFactory(newServiceFactory(gdbVersion)); |
| 119 |
|
| 112 |
// Create and invoke the launch sequence to create the debug control and services |
120 |
// Create and invoke the launch sequence to create the debug control and services |
| 113 |
final ServicesLaunchSequence servicesLaunchSequence = |
121 |
final ServicesLaunchSequence servicesLaunchSequence = |
| 114 |
new ServicesLaunchSequence(launch.getSession(), launch, exePath, sessionType, attach); |
122 |
new ServicesLaunchSequence(launch.getSession(), launch, exePath, sessionType, attach); |
|
Lines 328-337
Link Here
|
| 328 |
return false; |
336 |
return false; |
| 329 |
} |
337 |
} |
| 330 |
|
338 |
|
|
|
339 |
private boolean isNonStopSupported(String version) { |
| 340 |
if (NON_STOP_FIRST_VERSION.compareTo(version) <= 0) { |
| 341 |
return true; |
| 342 |
} |
| 343 |
return false; |
| 344 |
} |
| 345 |
|
| 331 |
private IDsfDebugServicesFactory newServiceFactory(String version) { |
346 |
private IDsfDebugServicesFactory newServiceFactory(String version) { |
| 332 |
|
347 |
|
| 333 |
// TODO: Fix version number once non-stop GDB is delivered |
348 |
if (isNonStopSession && isNonStopSupported(version)) { |
| 334 |
if (isNonStopSession && version.startsWith("6.8.50.20080327")) { //$NON-NLS-1$ |
|
|
| 335 |
return new GdbDebugServicesFactoryNS(version); |
349 |
return new GdbDebugServicesFactoryNS(version); |
| 336 |
} |
350 |
} |
| 337 |
|
351 |
|