mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Bug 114793: Add an extension point to contribute command factories.
This commit is contained in:
parent
71d38ceea2
commit
c5831cdf12
2 changed files with 21 additions and 6 deletions
|
@ -6,12 +6,12 @@
|
||||||
<extension
|
<extension
|
||||||
point="org.eclipse.cdt.debug.core.CDebugger">
|
point="org.eclipse.cdt.debug.core.CDebugger">
|
||||||
<debugger
|
<debugger
|
||||||
platform="win32"
|
class="org.eclipse.cdt.debug.mi.core.GDBCDIDebugger2"
|
||||||
name="%GDBMIDebugger.name"
|
|
||||||
modes="run,core,attach"
|
|
||||||
cpu="native"
|
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>
|
||||||
<debugger
|
<debugger
|
||||||
platform="win32"
|
platform="win32"
|
||||||
|
|
|
@ -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.cdi.model.Target;
|
||||||
import org.eclipse.cdt.debug.mi.core.command.CLITargetAttach;
|
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.CommandFactory;
|
||||||
|
import org.eclipse.cdt.debug.mi.core.command.MIGDBSet;
|
||||||
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
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 {
|
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 {
|
protected void startAttachGDBSession( ILaunchConfiguration config, Session session, IProgressMonitor monitor ) throws CoreException {
|
||||||
|
|
Loading…
Add table
Reference in a new issue