I believe you also need to extend 
org.eclipse.debug.core.launchConfigurationTypes to 
create a new
launch configuration that will point to your new 
delegate.
 
CDT declares those in 
org.eclipse.cdt.debug.core/plugin.xml
 
Or maybe you can simply add the 
line
            
type="org.eclipse.cdt.launch.applicationLaunchType"
to your extension of 
launchDelegate.
Then you can choose your own delegate from the Debug 
Configurations... dialog,
  
  
  Sent: Wednesday, September 07, 2011 4:12 PM
To: CDT 
  General developers list.
Subject: Re: [cdt-dev] Small question 
  regarding the article "How to extend DSF-GDB"
 
  
  Hi,
i 
  thank you for the time you reviewed my code.
regarding 
  the "tracerdubug": its the package where my classes declared. i simply 
  mis-spelled it and haven't changed it since.
  
  Shai
  On Wed, Sep 7, 2011 at 6:30 PM, Marc Khouzam 
<marc.khouzam@xxxxxxxxxxxx> 
  wrote:
  
    
    The delegate entry 
    in your plugin.xml file must point to a valid class
    "tracerdubug.MyTracerLaunchDelegate"
    may not be 
    correct.
     
    
    
     
    
    
    
    
    
    Good 
    day,
I am writing to you because I tried to follow the instructions 
    [here: http://wiki.eclipse.org/CDT/cdt-debug-dsf-gdb-extensibility] 
    for adding a new command to gdb while using cdt eclipse.
I does not seem 
    to work at all. I put print statements in all of the methods of all the 
    extended classes. Nothing gets printed, which indicates that none of these 
    methods are called. Following is my code. What am I missing?
(i didn't 
    get to the point of actually implementing the new services factory since i 
    there is no point until i figure out how to make eclipse invoke 
    MyTracerLaunchDelegate 
    delegate).
//################################################################
plugin.xml:
<plugin>
  
    <extension
         
    point="org.eclipse.debug.core.launchDelegates">
      
    <launchDelegate
            
    delegate="tracerdubug.MyTracerLaunchDelegate"
            
    id="TracerDubug.MyTracerLaunchDelegate"
            
    modes="debug, run">
      
    </launchDelegate>
   
    </extension>
</plugin>
//################################################################
TracerRunControl
public 
    class TracerRunControl extends GDBRunControl_7_0 {
    
    /**
     * 
    
     */
    public TracerRunControl(DsfSession session) 
    {
        
    super(session);
        
    System.out.println("TracerRunControl");
    
    }
    
}
//################################################################
MyTracerLaunchDelegate
public 
    class MyTracerLaunchDelegate extends GdbLaunchDelegate implements 
    ILaunchConfigurationDelegate2{
    public 
    MyTracerLaunchDelegate() {
        
    super();
        
    System.out.println("MyTracerLaunchDelegate::ctr()");
    
    }
    
    
    @Override
    public void launch( ILaunchConfiguration 
    config, String mode, ILaunch launch, IProgressMonitor monitor ) throws 
    CoreException {
        
    System.out.println("MyTracerLaunchDelegate::launch()");   
        
super.launch(config, mode, launch, 
    monitor);      
    
    }
    
    
    
    @Override
    protected IDsfDebugServicesFactory 
    newServiceFactory(String version) {
        
    System.out.println("MyTracerLaunchDelegate");
    
        return new 
    TracerDebugServicesFactory(version);
    
    }
}
//################################################################ 
TracerDebugServicesFactory
public 
    class TracerDebugServicesFactory extends GdbDebugServicesFactory {
    
    public TracerDebugServicesFactory(String version) {
    
        super(version);
        
    // TODO Auto-generated constructor stub
    
    }
    
    
    @Override
    protected ICommandControl 
    createCommandControl(DsfSession session, ILaunchConfiguration config) 
    {
        GDBControl_7_0 g = new 
    GDBControl_7_0(session,config);
        
    System.out.println("TracerDebugServicesFactory::createCommandControl");
    
        return g;
    
    }
    
    
    @Override
    protected IRunControl 
    createRunControlService(DsfSession session) {
    
        
    System.out.println("TracerDebugServicesFactory::createProcessesService");
    
        return new 
    TracerRunControl(session);   
    
    }
    @Override
    protected 
    IProcesses createProcessesService(DsfSession session) 
    {
        
    System.out.println("TracerDebugServicesFactory::createProcessesService");
    
       return new GDBProcesses_7_0(session);
    
    }
}
Thanks,
Shai    
_______________________________________________
cdt-dev 
    mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev