Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 319257 - More flexible -exec-run/-exec-continue selection
Summary: More flexible -exec-run/-exec-continue selection
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug-dsf-gdb (show other bugs)
Version: 7.0   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Marc Khouzam CLA
QA Contact: Marc Khouzam CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-08 07:33 EDT by Vladimir Prus CLA
Modified: 2014-01-29 22:45 EST (History)
3 users (show)

See Also:
marc.khouzam: review? (pawel.1.piech)


Attachments
Proposed patch (1.23 KB, patch)
2010-07-08 07:34 EDT, Vladimir Prus CLA
cdtdoug: iplog+
Details | Diff
Fix preserving APIs (5.60 KB, patch)
2010-07-09 08:41 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff
Fix for GDBControl_7_0 and GDBControl (7.15 KB, patch)
2010-07-11 21:49 EDT, Marc Khouzam CLA
marc.khouzam: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Prus CLA 2010-07-08 07:33:31 EDT
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
Comment 1 Vladimir Prus CLA 2010-07-08 07:34:07 EDT
Created attachment 173762 [details]
Proposed patch
Comment 2 Anna Dushistova CLA 2010-07-08 11:06:33 EDT
Example of usage will be helpful to get better idea if this is exactly what we need.
Comment 3 Marc Khouzam CLA 2010-07-08 11:37:36 EDT
(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.
Comment 4 Marc Khouzam CLA 2010-07-08 11:42:26 EDT
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())
Comment 5 Marc Khouzam CLA 2010-07-09 08:41:32 EDT
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?
Comment 6 Anna Dushistova CLA 2010-07-09 15:30:49 EDT
This should work for my needs so far.
Comment 7 Marc Khouzam CLA 2010-07-11 21:49:38 EDT
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.
Comment 8 Marc Khouzam CLA 2010-07-11 21:51:01 EDT
Volodya, if this is not good enough for your needs, please re-open
Comment 9 Marc Khouzam CLA 2010-07-11 21:51:56 EDT
Pawel, can you review.  It is a very tiny change.