1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 01:06:01 +02:00

Added the "getSessionConfiguration" method to allow clients to provide their own session configurations.

This commit is contained in:
Mikhail Khodjaiants 2006-03-27 21:01:06 +00:00
parent 1018fe85a9
commit 5d825a202d
2 changed files with 16 additions and 1 deletions

View file

@ -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.

View file

@ -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.