org.eclipse.cdt.debug.mi.core
Class MIPlugin

java.lang.Object
  extended by org.eclipse.core.runtime.Plugin
      extended by org.eclipse.cdt.debug.mi.core.MIPlugin
All Implemented Interfaces:
org.osgi.framework.BundleActivator

public class MIPlugin
extends org.eclipse.core.runtime.Plugin

GDB/MI Plugin.


Field Summary
static java.lang.String EXTENSION_POINT_COMMAND_FACTORIES
          Simple identifier constant (value "commandFactories") for the "gdb/mi command factories" extension point.
static java.lang.String PLUGIN_ID
          The plug-in identifier of the Java core support (value "org.eclipse.jdt.core").
 
Fields inherited from class org.eclipse.core.runtime.Plugin
PLUGIN_PREFERENCE_SCOPE, PREFERENCES_DEFAULT_OVERRIDE_BASE_NAME, PREFERENCES_DEFAULT_OVERRIDE_FILE_NAME
 
Constructor Summary
MIPlugin()
          The constructor
 
Method Summary
 org.eclipse.cdt.debug.mi.core.cdi.Session createCSession(java.lang.String gdb, java.lang.String miVersion, java.io.File program, java.io.File core, java.io.File cwd, java.lang.String gdbinit, org.eclipse.core.runtime.IProgressMonitor monitor)
          Deprecated. use createSession
 org.eclipse.cdt.debug.mi.core.cdi.Session createCSession(java.lang.String gdb, java.lang.String miVersion, java.io.File program, java.io.File cwd, java.lang.String gdbinit, org.eclipse.cdt.debug.mi.core.IMITTY pty, org.eclipse.core.runtime.IProgressMonitor monitor)
          Deprecated. use createSession
 org.eclipse.cdt.debug.mi.core.cdi.Session createCSession(java.lang.String gdb, java.lang.String miVersion, java.io.File program, java.io.File cwd, java.lang.String gdbinit, org.eclipse.core.runtime.IProgressMonitor monitor)
          Deprecated. use createSession
 org.eclipse.cdt.debug.mi.core.cdi.Session createCSession(java.lang.String gdb, java.lang.String miVersion, java.io.File program, int pid, java.lang.String[] targetParams, java.io.File cwd, java.lang.String gdbinit, org.eclipse.core.runtime.IProgressMonitor monitor)
          Deprecated. use createSession
 org.eclipse.cdt.debug.mi.core.MISession createMISession(org.eclipse.cdt.debug.mi.core.MIProcess process, org.eclipse.cdt.debug.mi.core.IMITTY pty, int timeout, int type, int launchTimeout, java.lang.String miVersion, org.eclipse.core.runtime.IProgressMonitor monitor)
          Deprecated.  
 org.eclipse.cdt.debug.mi.core.MISession createMISession(org.eclipse.cdt.debug.mi.core.MIProcess process, org.eclipse.cdt.debug.mi.core.IMITTY pty, int type, java.lang.String miVersion, org.eclipse.core.runtime.IProgressMonitor monitor)
          Deprecated.  
 org.eclipse.cdt.debug.mi.core.cdi.Session createSession(int sessionType, java.lang.String gdb, org.eclipse.cdt.debug.mi.core.command.CommandFactory factory, java.io.File program, java.lang.String[] extraArgs, boolean usePty, org.eclipse.core.runtime.IProgressMonitor monitor)
          Starts a process by executing the following command: gdb -q -nw -i (extracted from the command factory) -tty (if usePTY is true) extraArgs program (if program is not null)
 void debugLog(java.lang.String message)
           
static java.lang.String getCommandFactory(org.eclipse.debug.core.ILaunchConfiguration config)
           
 org.eclipse.cdt.debug.mi.core.command.factories.CommandFactoryManager getCommandFactoryManager()
           
static int getCommandTimeout()
           
static MIPlugin getDefault()
          Returns the singleton.
static int getLaunchTimeout()
           
static java.lang.String getMIVersion(org.eclipse.debug.core.ILaunchConfiguration config)
           
static java.lang.String getResourceString(java.lang.String key)
           
static java.lang.String getUniqueIdentifier()
          Convenience method which returns the unique identifier of this plugin.
 void start(org.osgi.framework.BundleContext context)
           
 void stop(org.osgi.framework.BundleContext context)
           
 
Methods inherited from class org.eclipse.core.runtime.Plugin
find, find, getBundle, getDescriptor, getLog, getPluginPreferences, getStateLocation, internalInitializeDefaultPluginPreferences, isDebugging, openStream, openStream, savePluginPreferences, setDebugging, shutdown, startup, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PLUGIN_ID

public static final java.lang.String PLUGIN_ID
The plug-in identifier of the Java core support (value "org.eclipse.jdt.core").

See Also:
Constant Field Values

EXTENSION_POINT_COMMAND_FACTORIES

public static final java.lang.String EXTENSION_POINT_COMMAND_FACTORIES
Simple identifier constant (value "commandFactories") for the "gdb/mi command factories" extension point.

Since:
3.1
See Also:
Constant Field Values
Constructor Detail

MIPlugin

public MIPlugin()
The constructor

See Also:
Plugin.Plugin()
Method Detail

getDefault

public static MIPlugin getDefault()
Returns the singleton.


createMISession

public org.eclipse.cdt.debug.mi.core.MISession createMISession(org.eclipse.cdt.debug.mi.core.MIProcess process,
                                                               org.eclipse.cdt.debug.mi.core.IMITTY pty,
                                                               int timeout,
                                                               int type,
                                                               int launchTimeout,
                                                               java.lang.String miVersion,
                                                               org.eclipse.core.runtime.IProgressMonitor monitor)
                                                        throws org.eclipse.cdt.debug.mi.core.MIException
Deprecated. 

Method createMISession.

Parameters:
Process -
PTY -
int -
int -
Returns:
MISession
Throws:
MIException

createMISession

public org.eclipse.cdt.debug.mi.core.MISession createMISession(org.eclipse.cdt.debug.mi.core.MIProcess process,
                                                               org.eclipse.cdt.debug.mi.core.IMITTY pty,
                                                               int type,
                                                               java.lang.String miVersion,
                                                               org.eclipse.core.runtime.IProgressMonitor monitor)
                                                        throws org.eclipse.cdt.debug.mi.core.MIException
Deprecated. 

Method createMISession.

Parameters:
Process -
PTY -
type -
Returns:
MISession
Throws:
MIException

createCSession

public org.eclipse.cdt.debug.mi.core.cdi.Session createCSession(java.lang.String gdb,
                                                                java.lang.String miVersion,
                                                                java.io.File program,
                                                                java.io.File cwd,
                                                                java.lang.String gdbinit,
                                                                org.eclipse.core.runtime.IProgressMonitor monitor)
                                                         throws java.io.IOException,
                                                                org.eclipse.cdt.debug.mi.core.MIException
Deprecated. use createSession

Method createCSession; Create an new PTY instance and launch gdb in mi for local debug.

Parameters:
program -
Returns:
ICDISession
Throws:
MIException
java.io.IOException

createCSession

public org.eclipse.cdt.debug.mi.core.cdi.Session createCSession(java.lang.String gdb,
                                                                java.lang.String miVersion,
                                                                java.io.File program,
                                                                java.io.File cwd,
                                                                java.lang.String gdbinit,
                                                                org.eclipse.cdt.debug.mi.core.IMITTY pty,
                                                                org.eclipse.core.runtime.IProgressMonitor monitor)
                                                         throws java.io.IOException,
                                                                org.eclipse.cdt.debug.mi.core.MIException
Deprecated. use createSession

Method createCSession; lauch gdb in mi mode for local debugging

Parameters:
program -
Returns:
ICDISession
Throws:
java.io.IOException
org.eclipse.cdt.debug.mi.core.MIException

createCSession

public org.eclipse.cdt.debug.mi.core.cdi.Session createCSession(java.lang.String gdb,
                                                                java.lang.String miVersion,
                                                                java.io.File program,
                                                                java.io.File core,
                                                                java.io.File cwd,
                                                                java.lang.String gdbinit,
                                                                org.eclipse.core.runtime.IProgressMonitor monitor)
                                                         throws java.io.IOException,
                                                                org.eclipse.cdt.debug.mi.core.MIException
Deprecated. use createSession

Method createCSession; Post mortem debug with a core file.

Parameters:
program -
core -
Returns:
ICDISession
Throws:
java.io.IOException
org.eclipse.cdt.debug.mi.core.MIException

createCSession

public org.eclipse.cdt.debug.mi.core.cdi.Session createCSession(java.lang.String gdb,
                                                                java.lang.String miVersion,
                                                                java.io.File program,
                                                                int pid,
                                                                java.lang.String[] targetParams,
                                                                java.io.File cwd,
                                                                java.lang.String gdbinit,
                                                                org.eclipse.core.runtime.IProgressMonitor monitor)
                                                         throws java.io.IOException,
                                                                org.eclipse.cdt.debug.mi.core.MIException
Deprecated. use createSession

Method createCSession; remote debuging by selectin a target.

Parameters:
program -
pid -
Returns:
ICDISession
Throws:
java.io.IOException
org.eclipse.cdt.debug.mi.core.MIException

createSession

public org.eclipse.cdt.debug.mi.core.cdi.Session createSession(int sessionType,
                                                               java.lang.String gdb,
                                                               org.eclipse.cdt.debug.mi.core.command.CommandFactory factory,
                                                               java.io.File program,
                                                               java.lang.String[] extraArgs,
                                                               boolean usePty,
                                                               org.eclipse.core.runtime.IProgressMonitor monitor)
                                                        throws java.io.IOException,
                                                               org.eclipse.cdt.debug.mi.core.MIException
Starts a process by executing the following command: gdb -q -nw -i (extracted from the command factory) -tty (if usePTY is true) extraArgs program (if program is not null)

Parameters:
sessionType - the type of debugging session: MISession.PROGRAM, MISession.ATTACH or MISession.CORE
gdb - the name of the gdb file
factory - the command set supported by gdb
program - a program to debug or null
extraArgs - arguments to pass to gdb
usePty - whether to use pty or not
monitor - a progress monitor
Returns:
an instance of ICDISession
Throws:
java.io.IOException
MIException

getUniqueIdentifier

public static java.lang.String getUniqueIdentifier()
Convenience method which returns the unique identifier of this plugin.


debugLog

public void debugLog(java.lang.String message)

getResourceString

public static java.lang.String getResourceString(java.lang.String key)

start

public void start(org.osgi.framework.BundleContext context)
           throws java.lang.Exception
Specified by:
start in interface org.osgi.framework.BundleActivator
Overrides:
start in class org.eclipse.core.runtime.Plugin
Throws:
java.lang.Exception

stop

public void stop(org.osgi.framework.BundleContext context)
          throws java.lang.Exception
Specified by:
stop in interface org.osgi.framework.BundleActivator
Overrides:
stop in class org.eclipse.core.runtime.Plugin
Throws:
java.lang.Exception

getCommandTimeout

public static int getCommandTimeout()

getLaunchTimeout

public static int getLaunchTimeout()

getMIVersion

public static java.lang.String getMIVersion(org.eclipse.debug.core.ILaunchConfiguration config)

getCommandFactory

public static java.lang.String getCommandFactory(org.eclipse.debug.core.ILaunchConfiguration config)

getCommandFactoryManager

public org.eclipse.cdt.debug.mi.core.command.factories.CommandFactoryManager getCommandFactoryManager()