Community
Participate
Working Groups
Build Identifier: At present, DSF startup sequence uses -exec-run for sessions that are local, and -exec-continue for sessions that are 'remote'. However, there are various corner cases where a session is not truly local (that is, GDB is not exec-ing a native host application), but where '-exec-run' is needed. The attached patch adds a hook that can be used to solve the problem. Reproducible: Always
Created attachment 173762 [details] Proposed patch
Example of usage will be helpful to get better idea if this is exactly what we need.
(In reply to comment #2) > Example of usage will be helpful to get better idea if this is exactly what we > need. +1 :-) Also, the change would require a major version increase, which I want to try to avoid. Let's see with the example if we can find another way to address this.
The way to avoid this problem is to: > Since this is a different behavior than GDB, you will need > to override what we do for GDB. Luckily, this particular change > is not part of FinalLauchSequence, but is part of the the > IGDBControl service. You can write your own service that extends > GDBControl or GDBControl_7_0 and override startOrRestart(...) > You can instantiate the correct version of your new service > by overriding GdbDebugServicesFactory and instantiating it > in your launch delegate (method newServiceFactory())
Created attachment 173852 [details] Fix preserving APIs This patch allows to choose between -exec-run and -exec-continue without having to override the entire startOrRestart() method. As you can see, it is meant to be used by an overridden service, and not outside. It also is backwards compatible. Is that good for what you need?
This should work for my needs so far.
Created attachment 173988 [details] Fix for GDBControl_7_0 and GDBControl This patch includes the proposed fix but also applied to GDBControl. Committed to HEAD.
Volodya, if this is not good enough for your needs, please re-open
Pawel, can you review. It is a very tiny change.
*** cdt cvs genie on behalf of mkhouzam *** Bug 319257: Allow for overriding of when to use -exec-run or -exec-continue [*] GDBControl_7_0.java 1.20 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl_7_0.java?root=Tools_Project&r1=1.19&r2=1.20 [*] GDBControl.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/command/GDBControl.java?root=Tools_Project&r1=1.15&r2=1.16