Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 108506 Details for
Bug 241985
[services] Service factory should be used to create ICommandControl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Ugly solution that works
zpatch.txt (text/plain), 6.95 KB, created by
Marc Khouzam
on 2008-07-27 15:11:42 EDT
(
hide
)
Description:
Ugly solution that works
Filename:
MIME Type:
Creator:
Marc Khouzam
Created:
2008-07-27 15:11:42 EDT
Size:
6.95 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.dd.gdb >Index: src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.dd.dsf/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java,v >retrieving revision 1.15 >diff -u -r1.15 GDBControl.java >--- src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java 22 Jul 2008 19:19:43 -0000 1.15 >+++ src/org/eclipse/dd/gdb/internal/provisional/service/command/GDBControl.java 27 Jul 2008 19:05:52 -0000 >@@ -103,7 +103,7 @@ > private IPath fExecPath; > private Process fProcess; > private int fGDBExitValue; >- final private int fGDBLaunchTimeout; >+ private int fGDBLaunchTimeout = 30; > > private MIRunControlEventProcessor fMIEventProcessor; > private CLIEventProcessor fCLICommandProcessor; >@@ -112,6 +112,22 @@ > > private PTY fPty; > >+ public GDBControl(DsfSession session) { >+ super(session); >+ fControlDmc = new GDBControlDMContext(session.getId(), "gdbcontrol[" + ++fgInstanceCounter + "]"); //$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ >+ public void setGdbPath(IPath path) { fGdbPath = path; } >+ >+ public void setExecPath(IPath path) { fExecPath = path; } >+ >+ public void setSessionType(SessionType type) { fSessionType = type; } >+ >+ public void setAttach(boolean attach) { fAttach = attach; } >+ >+ public void setLaunchTimeout(int timeout) { fGDBLaunchTimeout = timeout; } >+ >+ @Deprecated > public GDBControl(DsfSession session, IPath gdbPath, IPath execPath, SessionType sessionType, boolean attach, int gdbLaunchTimeout) { > super(session); > fSessionType = sessionType; >Index: src/org/eclipse/dd/gdb/internal/provisional/service/GdbDebugServicesFactory.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.dd.dsf/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/service/GdbDebugServicesFactory.java,v >retrieving revision 1.2 >diff -u -r1.2 GdbDebugServicesFactory.java >--- src/org/eclipse/dd/gdb/internal/provisional/service/GdbDebugServicesFactory.java 3 Jul 2008 19:05:20 -0000 1.2 >+++ src/org/eclipse/dd/gdb/internal/provisional/service/GdbDebugServicesFactory.java 27 Jul 2008 19:05:51 -0000 >@@ -22,7 +22,9 @@ > import org.eclipse.dd.dsf.debug.service.IRunControl; > import org.eclipse.dd.dsf.debug.service.ISourceLookup; > import org.eclipse.dd.dsf.debug.service.IStack; >+import org.eclipse.dd.dsf.debug.service.command.ICommandControl; > import org.eclipse.dd.dsf.service.DsfSession; >+import org.eclipse.dd.gdb.internal.provisional.service.command.GDBControl; > import org.eclipse.dd.mi.service.CSourceLookup; > import org.eclipse.dd.mi.service.ExpressionService; > import org.eclipse.dd.mi.service.MIBreakpoints; >@@ -35,10 +37,14 @@ > > public class GdbDebugServicesFactory extends AbstractDsfDebugServicesFactory { > >+ private final String fVersion; >+ > public GdbDebugServicesFactory(String version) { >+ fVersion = version; > } > >- >+ public String getVersion() { return fVersion; } >+ > @Override > @SuppressWarnings("unchecked") > public <V> V createService(DsfSession session, Class<V> clazz) { >@@ -49,58 +55,62 @@ > return super.createService(session, clazz); > } > >- @Override >- protected IDisassembly createDisassemblyService(DsfSession session) { >- return new MIDisassembly(session); >- } >- >- @Override >- protected IRegisters createRegistersService(DsfSession session) { >- return new MIRegisters(session); >+ protected MIBreakpointsManager createBreakpointManagerService(DsfSession session) { >+ return new MIBreakpointsManager(session, CDebugCorePlugin.PLUGIN_ID); > } >- >+ > @Override > protected IBreakpoints createBreakpointService(DsfSession session) { > return new MIBreakpoints(session); > } > > @Override >- protected ISourceLookup createSourceLookupService(DsfSession session) { >- return new CSourceLookup(session); >+ protected ICommandControl createCommandControl(DsfSession session) { >+ return new GDBControl(session); >+ } >+ >+ @Override >+ protected IDisassembly createDisassemblyService(DsfSession session) { >+ return new MIDisassembly(session); > } > > @Override > protected IExpressions createExpressionService(DsfSession session) { > return new ExpressionService(session); > } >- >+ > @Override >- protected IStack createStackService(DsfSession session) { >- return new MIStack(session); >+ protected IMemory createMemoryService(DsfSession session) { >+ return new MIMemory(session); > } >- >+ > @Override > protected IModules createModulesService(DsfSession session) { > return new MIModules(session); > } >- >+ > @Override >- protected IMemory createMemoryService(DsfSession session) { >- return new MIMemory(session); >+ protected IProcesses createProcessesService(DsfSession session) { >+ return new GDBProcesses(session); > } >- >+ >+ @Override >+ protected IRegisters createRegistersService(DsfSession session) { >+ return new MIRegisters(session); >+ } >+ > @Override > protected IRunControl createRunControlService(DsfSession session) { > return new GDBRunControl(session); > } >- >+ > @Override >- protected IProcesses createProcessesService(DsfSession session) { >- return new GDBProcesses(session); >+ protected ISourceLookup createSourceLookupService(DsfSession session) { >+ return new CSourceLookup(session); > } > >- protected MIBreakpointsManager createBreakpointManagerService(DsfSession session) { >- return new MIBreakpointsManager(session, CDebugCorePlugin.PLUGIN_ID); >+ @Override >+ protected IStack createStackService(DsfSession session) { >+ return new MIStack(session); > } >- > } >Index: src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.dd.dsf/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java,v >retrieving revision 1.10 >diff -u -r1.10 ServicesLaunchSequence.java >--- src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java 16 Jul 2008 11:02:57 -0000 1.10 >+++ src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java 27 Jul 2008 19:05:51 -0000 >@@ -40,8 +40,13 @@ > // > // Create the connection. > // >- fCommandControl = new GDBControl(fSession, LaunchUtils.getGDBPath(fLaunch.getLaunchConfiguration()), >- fExecPath, fSessionType, fAttach, 30); >+ fCommandControl = fLaunch.getServiceFactory().createService(fSession, GDBControl.class); >+ >+ fCommandControl.setAttach(fAttach); >+ fCommandControl.setExecPath(fExecPath); >+ fCommandControl.setGdbPath(LaunchUtils.getGDBPath(fLaunch.getLaunchConfiguration())); >+ fCommandControl.setSessionType(fSessionType); >+ > fCommandControl.initialize(requestMonitor); > } > },
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
cdtdoug
:
iplog-
Actions:
View
|
Diff
Attachments on
bug 241985
:
108369
| 108506 |
108679
|
108683