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 (-1 / +17 lines)
Lines 103-109 Link Here
103
    private IPath fExecPath; 
103
    private IPath fExecPath; 
104
    private Process fProcess;
104
    private Process fProcess;
105
    private int fGDBExitValue;
105
    private int fGDBExitValue;
106
    final private int fGDBLaunchTimeout;
106
    private int fGDBLaunchTimeout = 30;
107
    
107
    
108
    private MIRunControlEventProcessor fMIEventProcessor;
108
    private MIRunControlEventProcessor fMIEventProcessor;
109
    private CLIEventProcessor fCLICommandProcessor;
109
    private CLIEventProcessor fCLICommandProcessor;
Lines 112-117 Link Here
112
    
112
    
113
    private PTY fPty;
113
    private PTY fPty;
114
    
114
    
115
    public GDBControl(DsfSession session) {
116
        super(session);
117
        fControlDmc = new GDBControlDMContext(session.getId(), "gdbcontrol[" + ++fgInstanceCounter + "]"); //$NON-NLS-1$ //$NON-NLS-2$
118
    }
119
120
    public void setGdbPath(IPath path) { fGdbPath = path; }
121
122
    public void setExecPath(IPath path) { fExecPath = path; }
123
124
    public void setSessionType(SessionType type) { fSessionType = type; }
125
126
    public void setAttach(boolean attach) { fAttach = attach; }
127
128
    public void setLaunchTimeout(int timeout) { fGDBLaunchTimeout = timeout; }
129
130
    @Deprecated
115
    public GDBControl(DsfSession session, IPath gdbPath, IPath execPath, SessionType sessionType, boolean attach, int gdbLaunchTimeout) {
131
    public GDBControl(DsfSession session, IPath gdbPath, IPath execPath, SessionType sessionType, boolean attach, int gdbLaunchTimeout) {
116
        super(session);
132
        super(session);
117
        fSessionType = sessionType;
133
        fSessionType = sessionType;
(-)src/org/eclipse/dd/gdb/internal/provisional/service/GdbDebugServicesFactory.java (-26 / +36 lines)
Lines 22-28 Link Here
22
import org.eclipse.dd.dsf.debug.service.IRunControl;
22
import org.eclipse.dd.dsf.debug.service.IRunControl;
23
import org.eclipse.dd.dsf.debug.service.ISourceLookup;
23
import org.eclipse.dd.dsf.debug.service.ISourceLookup;
24
import org.eclipse.dd.dsf.debug.service.IStack;
24
import org.eclipse.dd.dsf.debug.service.IStack;
25
import org.eclipse.dd.dsf.debug.service.command.ICommandControl;
25
import org.eclipse.dd.dsf.service.DsfSession;
26
import org.eclipse.dd.dsf.service.DsfSession;
27
import org.eclipse.dd.gdb.internal.provisional.service.command.GDBControl;
26
import org.eclipse.dd.mi.service.CSourceLookup;
28
import org.eclipse.dd.mi.service.CSourceLookup;
27
import org.eclipse.dd.mi.service.ExpressionService;
29
import org.eclipse.dd.mi.service.ExpressionService;
28
import org.eclipse.dd.mi.service.MIBreakpoints;
30
import org.eclipse.dd.mi.service.MIBreakpoints;
Lines 35-44 Link Here
35
37
36
public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
38
public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory {
37
39
40
	private final String fVersion;
41
	
38
	public GdbDebugServicesFactory(String version) {
42
	public GdbDebugServicesFactory(String version) {
43
		fVersion = version;
39
	}
44
	}
40
	
45
	
41
46
	public String getVersion() { return fVersion; }
47
	
42
	@Override
48
	@Override
43
    @SuppressWarnings("unchecked")
49
    @SuppressWarnings("unchecked")
44
    public <V> V createService(DsfSession session, Class<V> clazz) {
50
    public <V> V createService(DsfSession session, Class<V> clazz) {
Lines 49-106 Link Here
49
        return super.createService(session, clazz);
55
        return super.createService(session, clazz);
50
	}
56
	}
51
57
52
	@Override
58
	protected MIBreakpointsManager createBreakpointManagerService(DsfSession session) {
53
	protected IDisassembly createDisassemblyService(DsfSession session) {
59
		return new MIBreakpointsManager(session, CDebugCorePlugin.PLUGIN_ID);
54
		return new MIDisassembly(session);
55
	}
56
	
57
	@Override
58
	protected IRegisters createRegistersService(DsfSession session) {
59
		return new MIRegisters(session);
60
	}
60
	}
61
		
61
62
	@Override
62
	@Override
63
	protected IBreakpoints createBreakpointService(DsfSession session) {
63
	protected IBreakpoints createBreakpointService(DsfSession session) {
64
		return new MIBreakpoints(session);
64
		return new MIBreakpoints(session);
65
	}
65
	}
66
	
66
	
67
	@Override
67
	@Override
68
	protected ISourceLookup createSourceLookupService(DsfSession session) {
68
	protected ICommandControl createCommandControl(DsfSession session) {	
69
		return new CSourceLookup(session);
69
		return new GDBControl(session);
70
	}
71
72
	@Override
73
	protected IDisassembly createDisassemblyService(DsfSession session) {
74
		return new MIDisassembly(session);
70
	}
75
	}
71
	
76
	
72
	@Override
77
	@Override
73
	protected IExpressions createExpressionService(DsfSession session) {
78
	protected IExpressions createExpressionService(DsfSession session) {
74
		return new ExpressionService(session);
79
		return new ExpressionService(session);
75
	}
80
	}
76
	
81
77
	@Override
82
	@Override
78
	protected IStack createStackService(DsfSession session) {
83
	protected IMemory createMemoryService(DsfSession session) {
79
		return new MIStack(session);
84
		return new MIMemory(session);
80
	}
85
	}
81
	
86
82
	@Override
87
	@Override
83
	protected IModules createModulesService(DsfSession session) {
88
	protected IModules createModulesService(DsfSession session) {
84
		return new MIModules(session);
89
		return new MIModules(session);
85
	}
90
	}
86
	
91
		
87
	@Override
92
	@Override
88
	protected IMemory createMemoryService(DsfSession session) {
93
	protected IProcesses createProcessesService(DsfSession session) {
89
		return new MIMemory(session);
94
		return new GDBProcesses(session);
90
	}
95
	}
91
	
96
97
	@Override
98
	protected IRegisters createRegistersService(DsfSession session) {
99
		return new MIRegisters(session);
100
	}
101
92
	@Override
102
	@Override
93
	protected IRunControl createRunControlService(DsfSession session) {
103
	protected IRunControl createRunControlService(DsfSession session) {
94
		return new GDBRunControl(session);
104
		return new GDBRunControl(session);
95
	}
105
	}
96
	
106
97
	@Override
107
	@Override
98
	protected IProcesses createProcessesService(DsfSession session) {
108
	protected ISourceLookup createSourceLookupService(DsfSession session) {
99
		return new GDBProcesses(session);
109
		return new CSourceLookup(session);
100
	}
110
	}
101
	
111
	
102
	protected MIBreakpointsManager createBreakpointManagerService(DsfSession session) {
112
	@Override
103
		return new MIBreakpointsManager(session, CDebugCorePlugin.PLUGIN_ID);
113
	protected IStack createStackService(DsfSession session) {
114
		return new MIStack(session);
104
	}
115
	}
105
106
}
116
}
(-)src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java (-2 / +7 lines)
Lines 40-47 Link Here
40
                //
40
                //
41
                // Create the connection.
41
                // Create the connection.
42
                //
42
                //
43
                fCommandControl = new GDBControl(fSession, LaunchUtils.getGDBPath(fLaunch.getLaunchConfiguration()),
43
                fCommandControl = fLaunch.getServiceFactory().createService(fSession, GDBControl.class);
44
                		                         fExecPath, fSessionType, fAttach, 30);
44
45
                fCommandControl.setAttach(fAttach);
46
                fCommandControl.setExecPath(fExecPath);
47
                fCommandControl.setGdbPath(LaunchUtils.getGDBPath(fLaunch.getLaunchConfiguration()));
48
                fCommandControl.setSessionType(fSessionType);
49
45
                fCommandControl.initialize(requestMonitor);
50
                fCommandControl.initialize(requestMonitor);
46
            }
51
            }
47
        },
52
        },

Return to bug 241985