Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [cdt-dev] DSF/GDB extensibility, Part 2: Adding new service

> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Mikhail Khodjaiants
> Sent: Wednesday, July 07, 2010 6:30 PM
> To: cdt-dev@xxxxxxxxxxx
> Subject: [cdt-dev] DSF/GDB extensibility, Part 2: Adding new service
> Hi,
> I have been looking for a way to add a new service to our DSF/GDB 
> extension. The natural way to do it is by extending 
> ServicesLaunchSequence. But unlike FinalLaunchSequence, 
> ServicesLaunchSequence is created inside a private method of 
> GdbLaunchDelegate and can not be overwritten. Is this 
> intentional? How 
> can I add a new Service without rewriting most of the 
> GdbLaunchDelegate 
> code?

I should have seen this limitation when I added the TraceControl
service.  We should improve the use of ServicesLaunchSequence to
be done like FinalLaunchSequence.

If you want to override ServicesLaunchSequence you'll get similar 
problems as our FinalLSequence discussion.

A dirtier solution would be to instanciate your new service from 
another place, like from another service you are overriding.

Remember that you'll also have to override ShutdownSequence,
which may need some changes too.

I'm have the feeling this case could be done more elegantly.
Maybe the ServicesFactory should help us here.  It could 
contain an ordered list of services to be instantiated.  
Something that can easily be overriden.  Then 
ServicesLaunchSequence and ShutdownSequence would then be 
simple loops going through that list.

Off the top of my head...


Back to the top