1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug 114793: Add an extension point to contribute command factories.

This commit is contained in:
Mikhail Khodjaiants 2006-02-06 21:08:44 +00:00
parent 71d38ceea2
commit c5831cdf12
2 changed files with 21 additions and 6 deletions

View file

@ -6,12 +6,12 @@
<extension
point="org.eclipse.cdt.debug.core.CDebugger">
<debugger
platform="win32"
name="%GDBMIDebugger.name"
modes="run,core,attach"
class="org.eclipse.cdt.debug.mi.core.GDBCDIDebugger2"
cpu="native"
class="org.eclipse.cdt.debug.mi.core.CygwinGDBCDIDebugger2"
id="org.eclipse.cdt.debug.mi.core.CDebuggerNew">
id="org.eclipse.cdt.debug.mi.core.CDebuggerNew"
modes="run,core,attach"
name="%GDBMIDebugger.name"
platform="*">
</debugger>
<debugger
platform="win32"

View file

@ -22,6 +22,7 @@ import org.eclipse.cdt.debug.mi.core.cdi.SharedLibraryManager;
import org.eclipse.cdt.debug.mi.core.cdi.model.Target;
import org.eclipse.cdt.debug.mi.core.command.CLITargetAttach;
import org.eclipse.cdt.debug.mi.core.command.CommandFactory;
import org.eclipse.cdt.debug.mi.core.command.MIGDBSet;
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
@ -112,7 +113,21 @@ public class GDBCDIDebugger2 extends AbstractGDBCDIDebugger {
}
protected void startLocalGDBSession( ILaunchConfiguration config, Session session, IProgressMonitor monitor ) throws CoreException {
// TODO: need a better solution for new-console
MISession miSession = getMISession( session );
try {
CommandFactory factory = miSession.getCommandFactory();
MIGDBSet set = factory.createMIGDBSet( new String[]{ "new-console" } ); //$NON-NLS-1$
miSession.postCommand( set );
MIInfo info = set.getMIInfo();
if ( info == null ) {
throw new MIException( MIPlugin.getResourceString( "src.common.No_answer" ) ); //$NON-NLS-1$
}
}
catch( MIException e ) {
// We ignore this exception, for example
// on GNU/Linux the new-console is an error.
}
}
protected void startAttachGDBSession( ILaunchConfiguration config, Session session, IProgressMonitor monitor ) throws CoreException {