Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 237556 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/dd/gdb/internal/provisional/launching/GdbLaunchDelegate.java (-4 / +18 lines)
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
(-)src/org/eclipse/dd/gdb/internal/ui/launching/GdbDebuggerPage.java (-1 lines)
Lines 264-270 Link Here
264
		// TODO: Find a way to determine if non-stop is supported (i.e. find the GDB version) then grey out the check box if necessary 
264
		// TODO: Find a way to determine if non-stop is supported (i.e. find the GDB version) then grey out the check box if necessary 
265
		// Button fNonStopButton = ControlFactory.createCheckBox(subComp, LaunchUIMessages.getString( "GDBDebuggerPage.15") ); //$NON-NLS-1$
265
		// Button fNonStopButton = ControlFactory.createCheckBox(subComp, LaunchUIMessages.getString( "GDBDebuggerPage.15") ); //$NON-NLS-1$
266
		fNonStopCheckBox = ControlFactory.createCheckBox(subComp, LaunchUIMessages.getString("GDBDebuggerPage.13")); //$NON-NLS-1$
266
		fNonStopCheckBox = ControlFactory.createCheckBox(subComp, LaunchUIMessages.getString("GDBDebuggerPage.13")); //$NON-NLS-1$
267
		fNonStopCheckBox.setEnabled(false);
268
		fNonStopCheckBox.addSelectionListener( new SelectionAdapter() {
267
		fNonStopCheckBox.addSelectionListener( new SelectionAdapter() {
269
				@Override
268
				@Override
270
				public void widgetSelected(SelectionEvent e) {
269
				public void widgetSelected(SelectionEvent e) {

Return to bug 237556