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 241985 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java (-6 / +3 lines)
Lines 114-126 Link Here
114
    private MIInferiorProcess fInferiorProcess = null;
114
    private MIInferiorProcess fInferiorProcess = null;
115
    
115
    
116
    private PTY fPty;
116
    private PTY fPty;
117
    
118
    public GDBControl(DsfSession session) {
119
        super(session);
120
        fControlDmc = new GDBControlDMContext(session.getId(), "gdbcontrol[" + ++fgInstanceCounter + "]"); //$NON-NLS-1$ //$NON-NLS-2$
121
    }
122
117
123
    public void initData(ILaunchConfiguration config) { 
118
    public GDBControl(DsfSession session, ILaunchConfiguration config) { 
119
        super(session);
124
        fSessionType = LaunchUtils.getSessionType(config);
120
        fSessionType = LaunchUtils.getSessionType(config);
125
        fAttach = LaunchUtils.getIsAttach(config);
121
        fAttach = LaunchUtils.getIsAttach(config);
126
        fGdbPath = LaunchUtils.getGDBPath(config);
122
        fGdbPath = LaunchUtils.getGDBPath(config);
Lines 129-134 Link Here
129
		} catch (CoreException e) {
125
		} catch (CoreException e) {
130
			fExecPath = new Path(""); //$NON-NLS-1$
126
			fExecPath = new Path(""); //$NON-NLS-1$
131
		}
127
		}
128
        fControlDmc = new GDBControlDMContext(session.getId(), "gdbcontrol[" + ++fgInstanceCounter + "]"); //$NON-NLS-1$ //$NON-NLS-2$
132
    }
129
    }
133
130
134
    @Deprecated
131
    @Deprecated
(-)src/org/eclipse/dd/gdb/internal/provisional/service/GdbDebugServicesFactory.java (-6 / +13 lines)
Lines 34-39 Link Here
34
import org.eclipse.dd.mi.service.MIModules;
34
import org.eclipse.dd.mi.service.MIModules;
35
import org.eclipse.dd.mi.service.MIRegisters;
35
import org.eclipse.dd.mi.service.MIRegisters;
36
import org.eclipse.dd.mi.service.MIStack;
36
import org.eclipse.dd.mi.service.MIStack;
37
import org.eclipse.debug.core.ILaunchConfiguration;
37
38
38
public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
39
public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
39
40
Lines 47-56 Link Here
47
	
48
	
48
	@Override
49
	@Override
49
    @SuppressWarnings("unchecked")
50
    @SuppressWarnings("unchecked")
50
    public <V> V createService(DsfSession session, Class<V> clazz) {
51
    public <V> V createService(DsfSession session, Class<V> clazz, Object ... arguments) {
51
        if (MIBreakpointsManager.class.isAssignableFrom(clazz)) {
52
		if (MIBreakpointsManager.class.isAssignableFrom(clazz)) {
52
			return (V)createBreakpointManagerService(session);
53
			return (V)createBreakpointManagerService(session);
53
		} 
54
		} else  if (ICommandControl.class.isAssignableFrom(clazz)) {
55
			for (Object arg : arguments) {
56
				if (arg instanceof ILaunchConfiguration) {
57
					return (V)createCommandControl(session, (ILaunchConfiguration)arg);
58
				}
59
			}
60
		}
61
54
62
55
        return super.createService(session, clazz);
63
        return super.createService(session, clazz);
56
	}
64
	}
Lines 64-72 Link Here
64
		return new MIBreakpoints(session);
72
		return new MIBreakpoints(session);
65
	}
73
	}
66
	
74
	
67
	@Override
75
	protected ICommandControl createCommandControl(DsfSession session, ILaunchConfiguration config) {	
68
	protected ICommandControl createCommandControl(DsfSession session) {	
76
		return new GDBControl(session, config);
69
		return new GDBControl(session);
70
	}
77
	}
71
78
72
	@Override
79
	@Override
(-)src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java (-2 / +1 lines)
Lines 40-47 Link Here
40
                //
40
                //
41
                // Create the connection.
41
                // Create the connection.
42
                //
42
                //
43
                fCommandControl = fLaunch.getServiceFactory().createService(fSession, GDBControl.class);
43
                fCommandControl = fLaunch.getServiceFactory().createService(fSession, GDBControl.class, fLaunch.getLaunchConfiguration());
44
                fCommandControl.initData(fLaunch.getLaunchConfiguration());
45
                fCommandControl.initialize(requestMonitor);
44
                fCommandControl.initialize(requestMonitor);
46
            }
45
            }
47
        },
46
        },
(-)src/org/eclipse/dd/dsf/debug/service/AbstractDsfDebugServicesFactory.java (-1 / +1 lines)
Lines 16-22 Link Here
16
public abstract class AbstractDsfDebugServicesFactory implements IDsfDebugServicesFactory {
16
public abstract class AbstractDsfDebugServicesFactory implements IDsfDebugServicesFactory {
17
17
18
    @SuppressWarnings("unchecked")
18
    @SuppressWarnings("unchecked")
19
	public <V> V createService(DsfSession session, Class<V> clazz) {
19
	public <V> V createService(DsfSession session, Class<V> clazz, Object ... arguments) {
20
       	if (IBreakpoints.class.isAssignableFrom(clazz)) {
20
       	if (IBreakpoints.class.isAssignableFrom(clazz)) {
21
    		return (V)createBreakpointService(session);
21
    		return (V)createBreakpointService(session);
22
       	} else if (ICommandControl.class.isAssignableFrom(clazz)) {
22
       	} else if (ICommandControl.class.isAssignableFrom(clazz)) {
(-)src/org/eclipse/dd/dsf/debug/service/IDsfDebugServicesFactory.java (-1 / +1 lines)
Lines 17-21 Link Here
17
 * to easily have different service implementation for different backends.
17
 * to easily have different service implementation for different backends.
18
 */
18
 */
19
public interface IDsfDebugServicesFactory {
19
public interface IDsfDebugServicesFactory {
20
	public <V> V createService(DsfSession session, Class<V> clazz);
20
	public <V> V createService(DsfSession session, Class<V> clazz, Object ... arguments);
21
}
21
}

Return to bug 241985