mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Added the "getSessionConfiguration" method to allow clients to provide their own session configurations.
This commit is contained in:
parent
1018fe85a9
commit
5d825a202d
2 changed files with 16 additions and 1 deletions
|
@ -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
|
2006-03-23 Mikhail Khodjaiants
|
||||||
Pass ILaunch instead of ILaunchConfiguration.
|
Pass ILaunch instead of ILaunchConfiguration.
|
||||||
Added "getGDBPath" method.
|
Added "getGDBPath" method.
|
||||||
|
|
|
@ -19,6 +19,7 @@ import org.eclipse.cdt.debug.core.ICDIDebugger2;
|
||||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||||
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
import org.eclipse.cdt.debug.core.cdi.CDIException;
|
||||||
import org.eclipse.cdt.debug.core.cdi.ICDISession;
|
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.core.cdi.model.ICDITarget;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.Session;
|
import org.eclipse.cdt.debug.mi.core.cdi.Session;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
|
||||||
|
@ -104,7 +105,12 @@ abstract public class AbstractGDBCDIDebugger implements ICDIDebugger2 {
|
||||||
String[] extraArgs = getExtraArguments( config );
|
String[] extraArgs = getExtraArguments( config );
|
||||||
boolean usePty = config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, true );
|
boolean usePty = config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, true );
|
||||||
try {
|
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( Exception e ) {
|
||||||
// Catch all wrap them up and rethrow
|
// Catch all wrap them up and rethrow
|
||||||
|
@ -152,6 +158,11 @@ abstract public class AbstractGDBCDIDebugger implements ICDIDebugger2 {
|
||||||
ILaunchConfiguration config = launch.getLaunchConfiguration();
|
ILaunchConfiguration config = launch.getLaunchConfiguration();
|
||||||
return new Path( config.getAttribute( IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, IMILaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT ) );
|
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
|
* Throws a core exception with an error status object built from
|
||||||
* the lower level exception and error code.
|
* the lower level exception and error code.
|
||||||
|
|
Loading…
Add table
Reference in a new issue