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

Don't create pty when using gdbserver.

This commit is contained in:
Mikhail Khodjaiants 2006-04-21 18:09:10 +00:00
parent 04be564ed0
commit b21c75453d
3 changed files with 17 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2006-04-21 Mikhail Khodjaiants
Don't create pty when using gdbserver.
* AbstractGDBCDIDebugger.java
* GDBServerCDIDebugger2.java
2006-04-21 Mikhail Khodjaiants
Close the pty if the session creation failed.
* MIPlugin.java

View file

@ -104,7 +104,7 @@ abstract public class AbstractGDBCDIDebugger implements ICDIDebugger2 {
ILaunchConfiguration config = launch.getLaunchConfiguration();
CommandFactory factory = getCommandFactory( config );
String[] extraArgs = getExtraArguments( config );
boolean usePty = config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, true );
boolean usePty = usePty( config );
try {
session = MIPlugin.getDefault().createSession( getSessionType( config ), gdbPath.toOSString(), factory, executable, extraArgs, usePty, monitor );
ICDISessionConfiguration sessionConfig = getSessionConfiguration( session );
@ -139,6 +139,10 @@ abstract public class AbstractGDBCDIDebugger implements ICDIDebugger2 {
return new String[0];
}
protected boolean usePty( ILaunchConfiguration config ) throws CoreException {
return config.getAttribute( ICDTLaunchConfigurationConstants.ATTR_USE_TERMINAL, true );
}
abstract protected CommandFactory getCommandFactory( ILaunchConfiguration config ) throws CoreException;
protected void doStartSession( ILaunch launch, Session session, IProgressMonitor monitor ) throws CoreException {

View file

@ -124,4 +124,11 @@ public class GDBServerCDIDebugger2 extends GDBCDIDebugger2 {
}
return new String[]{ "remote", remote }; //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.eclipse.cdt.debug.mi.core.AbstractGDBCDIDebugger#usePty(org.eclipse.debug.core.ILaunchConfiguration)
*/
protected boolean usePty( ILaunchConfiguration config ) throws CoreException {
return false;
}
}