Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] how to launch a specific gdb

> 	thanks for answering so quickly. i set these attributes 
> and it seem to launch the version i wanted, but about the 
> rest of the org.eclipse.cdt.debug.mi.core attribues like:
> 	org.eclipse.cdt.debug.mi.core.AUTO_SOLIB  =  true
> 	org.eclipse.cdt.debug.mi.core.AUTO_SOLIB_LIST  =  []
> 	org.eclipse.cdt.debug.mi.core.SOLIB_PATH  =  []

for the above, use the one from IGDBLaunchConfigurationConstants

> 	org.eclipse.cdt.debug.mi.core.STOP_ON_SOLIB_EVENTS  =  false
> 	org.eclipse.cdt.debug.mi.core.breakpointsFullPath  =  false
> 	org.eclipse.cdt.debug.mi.core.commandFactory  =  
> org.eclipse.cdt.debug.mi.core.standardLinuxCommandFactory
> 	org.eclipse.cdt.debug.mi.core.protocol  =  mi
> 	org.eclipse.cdt.debug.mi.core.verboseMode  =  false

The above are not supported for DSF-GDB, so you can forget
them.

> 	and what should i set the following DEBUG_NAME and 
> GDB_INIT if they are not used? 

Does not matter.  You don't have to set them.  They won't
be read.

> Oh and i have one more question. I get my configuration from 
> user through the configuration tab interface of 
> org.eclipse.cdt.launch.ui.CMainTab.

This is the CDI-GDB tab.  If you want the DSF-GDB debugger
you should use 
org.eclipse.cdt.dsf.gdb.internal.ui.launching.CMainTab

for the user to use the DSF-GDB delegate, they should
select it through the UI (if it is not done by default).
See: http://wiki.eclipse.org/CDT/User/FAQ#How_can_I_choose_another_debugger_integration_for_CDT.3F

> Therefore, to set these attributes, i have to get a 
> ILaunchConfigurationWorkingCopy copy of my configuration. 
> should i get it like this:
> ILaunchConfigurationWorkingCopy config  = 
> configuration.getWorkingCopy();
> so that the working copy will refer to this launch 
> configuration as its original launch configuration
> or like this (so it won't):
> ILaunchConfigurationWorkingCopy config  = 
> configuration.copy("some name");
> ?

That depends on what you are trying to achieve.

> what is the meaning of the refering the launch configuration 
> "as its original launch configuration"?

If you use configuration.getWorkingCopy() and then call doSave()
it will change the original configuration.  If you don't want that
to happen, then I guess configuration.copy("some name") is what
you want.

Marc



> 	Thanks,
> 	Shai
> 	
> 	
> 	On Thu, Sep 22, 2011 at 4:16 PM, Marc Khouzam 
> <marc.khouzam@xxxxxxxxxxxx> wrote:
> 	
> 
> 				For DSF-GDB, you have to use
> 		
> IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME which is 
> org.eclipse.cdt.dsf.gdb.DEBUG_NAME
> 		IGDBLaunchConfigurationConstants.ATTR_GDB_INIT 
> which is org.eclipse.cdt.dsf.gdb.GDB_INIT
> 		 
> 		My apologies for this confusion but it dates 
> back to when DSF-GDB was not part of CDT.
> 		You can write a but about aligning the CDI and 
> DSF launch constants so we can eventually fix this.
> 		 
> 		Marc
> 		 
> 
> 
> ________________________________
> 
> 			From: cdt-dev-bounces@xxxxxxxxxxx 
> [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of ?? ???
> 			Sent: Thursday, September 22, 2011 8:48 AM
> 			To: cdt-dev
> 			Subject: [cdt-dev] how to launch a specific gdb
> 			
> 			
> 			Hello,
> 			I added some functionality to the gdb 
> (version 7.0) and i would like to use it when i launch the 
> debugger. The problem is that it doesn't work.
> 			I created a launch configuration and 
> set the DEBUG_NAME and GDB_INIT attributes:
> 			
> org.eclipse.cdt.debug.mi.core.DEBUG_NAME  =  
> /home/shai/Desktop/gdb/gdb
> 			org.eclipse.cdt.debug.mi.core.GDB_INIT  
> =  /home/shai/Desktop/gdb/gdbinit.in  
> 			
> 			now i launch it:
> 			DebugUITools.launch(configuration, mode);
> 			
> 			but it launches the wrong gdb (i know 
> because it is gdb version 7.2).
> 			could anyone tell what I missed??
> 			
> 			note: my debug configuration has no 
> preferred delegate, but i think it not necessary to run my 
> extended gdb.
> 			
> 			Thanks,
> 			Shai
> 			
> 
> 
> 		_______________________________________________
> 		cdt-dev mailing list
> 		cdt-dev@xxxxxxxxxxx
> 		https://dev.eclipse.org/mailman/listinfo/cdt-dev
> 		
> 		
> 
> 
> 
> 

Back to the top