| Summary: | [launch] Allow for different versions of the FinalLaunchSequence | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Marc Khouzam <marc.khouzam> | ||||||
| Component: | cdt-debug-dsf-gdb | Assignee: | Marc Khouzam <marc.khouzam> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Marc Khouzam <marc.khouzam> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cdtdoug, nobody, pawel.1.piech, vladimir.prus | ||||||
| Version: | 8.0 | Flags: | marc.khouzam:
review?
(nobody) |
||||||
| Target Milestone: | 8.0 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Marc Khouzam
Created attachment 190292 [details]
Proposed fix
Here is what I suggest. The patch creates a new method IGDBControl.completeInitialization() which will in turn call the FinalLaunchSequence. This allows us to change the class to be called (say FinalLaunchSequence_7_2) from within a new version of the IGDBControl service.
The solution also provides with an getCompleteInitializationSequence() method that can be overridden by subclasses.
The tricky part of this solution was to keep the ability to cancel the launch during the launch sequence. That is why I used a RequestMonitorWithProgress.
I still have to fix the JTag launch for these changes.
Mikhail, could you confirm this solution is ok for your extending of DSF-GDB. BTW, I still can't set the review flag for you. (In reply to comment #2) > Mikhail, could you confirm this solution is ok for your extending of DSF-GDB. I thought I would give more details. With this solution 1- instead of overriding GdbLaunchDelegate.getFinalLaunchSequence() you now need to override GDBControl.getCompleteInitializationSequence() and GDBControl_7_0.getCompleteInitializationSequence() 2- The constructor of FinalLaunchSequence has changed (and is simpler), so you will have to modify any subclass. That should be it. Created attachment 190300 [details]
Fix including JTag launch
Here is the full patch. It is the same as before, but also contains the JTag changes that were required.
Having to extend base DSF-GDB for JTag made me realize that this change makes things a little more complicated for an extender. However, to achieve different versions of the FinalLaunchSequence, I don't think there is a better way than to go through a service.
I'm looking forward to comments on this.
Since API freeze is in a week, failing any comments, I will commit on Monday.
(In reply to comment #2) > Mikhail, could you confirm this solution is ok for your extending of DSF-GDB. > > BTW, I still can't set the review flag for you. The review flag now works for Mikhail Committed to HEAD. *** cdt cvs genie on behalf of mkhouzam *** Bug 338769: Allow for different versions of the FinalLaunchSequence [+] MacOSGdbJtagDebugServicesFactory.java http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/macos/MacOSGdbJtagDebugServicesFactory.java?root=Tools_Project&revision=1.1&view=markup [+] GDBJtagControl_7_2.java http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_2.java?root=Tools_Project&revision=1.1&view=markup [+] GdbJtagDebugServicesFactory.java http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GdbJtagDebugServicesFactory.java?root=Tools_Project&revision=1.1&view=markup [+] GDBJtagControl_7_0.java http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl_7_0.java?root=Tools_Project&revision=1.1&view=markup [+] GDBJtagControl.java http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/dsf/gdb/service/GDBJtagControl.java?root=Tools_Project&revision=1.1&view=markup [*] GDBJtagDSFFinalLaunchSequence.java 1.14 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFFinalLaunchSequence.java?root=Tools_Project&r1=1.13&r2=1.14 [*] GDBJtagDSFLaunchConfigurationDelegate.java 1.4 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/jtag/org.eclipse.cdt.debug.gdbjtag.core/src/org/eclipse/cdt/debug/gdbjtag/core/GDBJtagDSFLaunchConfigurationDelegate.java?root=Tools_Project&r1=1.3&r2=1.4 [*] MANIFEST.MF 1.12 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/jtag/org.eclipse.cdt.debug.gdbjtag.core/META-INF/MANIFEST.MF?root=Tools_Project&r1=1.11&r2=1.12 [*] GdbDebugServicesFactory.java 1.16 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GdbDebugServicesFactory.java?root=Tools_Project&r1=1.15&r2=1.16 [*] GdbLaunchDelegate.java 1.22 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java?root=Tools_Project&r1=1.21&r2=1.22 [*] FinalLaunchSequence.java 1.21 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence.java?root=Tools_Project&r1=1.20&r2=1.21 |