diff --git a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog index 776fb04e83e..ac6372bfed9 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.mi.core/ChangeLog @@ -1,3 +1,7 @@ +2006-03-27 Mikhail Khodjaiants + Added the "getSessionConfiguration" method to allow clients to provide their own session configurations. + * AbstractGDBCDIDebugger.java + 2006-03-23 Mikhail Khodjaiants Pass ILaunch instead of ILaunchConfiguration. Added "getGDBPath" method. diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/AbstractGDBCDIDebugger.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/AbstractGDBCDIDebugger.java index 382b18d9ecd..33f0cf75b4b 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/AbstractGDBCDIDebugger.java +++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/AbstractGDBCDIDebugger.java @@ -19,6 +19,7 @@ import org.eclipse.cdt.debug.core.ICDIDebugger2; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; import org.eclipse.cdt.debug.core.cdi.CDIException; import org.eclipse.cdt.debug.core.cdi.ICDISession; +import org.eclipse.cdt.debug.core.cdi.ICDISessionConfiguration; import org.eclipse.cdt.debug.core.cdi.model.ICDITarget; import org.eclipse.cdt.debug.mi.core.cdi.Session; import org.eclipse.cdt.debug.mi.core.cdi.model.Target; @@ -104,7 +105,12 @@ abstract public class AbstractGDBCDIDebugger implements ICDIDebugger2 { String[] extraArgs = getExtraArguments( config ); boolean usePty = config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, true ); try { - return MIPlugin.getDefault().createSession( getSessionType( config ), gdbPath.toOSString(), factory, executable, extraArgs, usePty, monitor ); + Session session = MIPlugin.getDefault().createSession( getSessionType( config ), gdbPath.toOSString(), factory, executable, extraArgs, usePty, monitor ); + ICDISessionConfiguration sessionConfig = getSessionConfiguration( session ); + if ( sessionConfig != null ) { + session.setConfiguration( sessionConfig ); + } + return session; } catch( Exception e ) { // Catch all wrap them up and rethrow @@ -152,6 +158,11 @@ abstract public class AbstractGDBCDIDebugger implements ICDIDebugger2 { ILaunchConfiguration config = launch.getLaunchConfiguration(); return new Path( config.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, IMILaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT ) ); } + + protected ICDISessionConfiguration getSessionConfiguration( ICDISession session ) { + return null; + } + /** * Throws a core exception with an error status object built from * the lower level exception and error code.