diff --git a/plugins/org.eclipse.dd.gdb/META-INF/MANIFEST.MF b/plugins/org.eclipse.dd.gdb/META-INF/MANIFEST.MF index 3862e66e04f..7bb5830b4e8 100644 --- a/plugins/org.eclipse.dd.gdb/META-INF/MANIFEST.MF +++ b/plugins/org.eclipse.dd.gdb/META-INF/MANIFEST.MF @@ -11,8 +11,7 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.dd.mi, org.eclipse.debug.core, org.eclipse.cdt.core, - org.eclipse.cdt.debug.core, - org.eclipse.cdt.debug.mi.core + org.eclipse.cdt.debug.core Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: J2SE-1.5 Export-Package: org.eclipse.dd.gdb.internal.provisional, diff --git a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/IGDBLaunchConfigurationConstants.java b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/IGDBLaunchConfigurationConstants.java index b530a354264..b9c6a7ad85e 100644 --- a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/IGDBLaunchConfigurationConstants.java +++ b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/IGDBLaunchConfigurationConstants.java @@ -10,9 +10,110 @@ *******************************************************************************/ package org.eclipse.dd.gdb.internal.provisional; +import org.eclipse.dd.gdb.internal.GdbPlugin; + public class IGDBLaunchConfigurationConstants { + // + // Taken from org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants + // + public static final String ATTR_REMOTE_TCP = GdbPlugin.PLUGIN_ID + ".REMOTE_TCP"; //$NON-NLS-1$ + public static final String ATTR_HOST = GdbPlugin.PLUGIN_ID + ".HOST"; //$NON-NLS-1$ + public static final String ATTR_PORT = GdbPlugin.PLUGIN_ID + ".PORT"; //$NON-NLS-1$ + public static final String ATTR_DEV = GdbPlugin.PLUGIN_ID + ".DEV"; //$NON-NLS-1$ + public static final String ATTR_DEV_SPEED = GdbPlugin.PLUGIN_ID + ".DEV_SPEED"; //$NON-NLS-1$ + // + // + + // + // New to DSF GDB/MI public static final String DEBUGGER_MODE_REMOTE = "remote"; //$NON-NLS-1$ public static final String DEBUGGER_MODE_REMOTE_ATTACH = "remote_attach"; //$NON-NLS-1$ + // + // + // + // Taken from org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants + // + /** + * Launch configuration attribute key. The value is the name of + * the Debuger associated with a C/C++ launch configuration. + */ + public static final String ATTR_DEBUG_NAME = GdbPlugin.PLUGIN_ID + ".DEBUG_NAME"; //$NON-NLS-1$ + + /** + * Launch configuration attribute key. Boolean value to set the gdb command file + * Debuger/gdb/MI property. + */ + public static final String ATTR_GDB_INIT = GdbPlugin.PLUGIN_ID + ".GDB_INIT"; //$NON-NLS-1$ + + /** + * Launch configuration attribute key. Boolean value to set the 'automatically load shared library symbols' flag of the debugger. + */ + public static final String ATTR_DEBUGGER_AUTO_SOLIB = GdbPlugin.PLUGIN_ID + ".AUTO_SOLIB"; //$NON-NLS-1$ + +// /** +// * Launch configuration attribute key. Boolean value to set the 'stop on shared library events' flag of the debugger. +// */ +// public static final String ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS = GdbPlugin.PLUGIN_ID + ".STOP_ON_SOLIB_EVENTS"; //$NON-NLS-1$ +// + /** + * Launch configuration attribute key. The value is a List (array of String) of directories for the search path of shared libraries. + */ + public static final String ATTR_DEBUGGER_SOLIB_PATH = GdbPlugin.PLUGIN_ID + ".SOLIB_PATH"; //$NON-NLS-1$ + +// /** +// * Launch configuration attribute key. The value is a List (array of String) of shared libraries to load symbols automatically. +// */ +// public static final String ATTR_DEBUGGER_AUTO_SOLIB_LIST = GdbPlugin.PLUGIN_ID + ".AUTO_SOLIB_LIST"; //$NON-NLS-1$ +// + /** + * Launch configuration attribute value. The key is ATTR_DEBUG_NAME. + */ + public static final String DEBUGGER_DEBUG_NAME_DEFAULT = "gdb"; //$NON-NLS-1$ + + /** + * Launch configuration attribute value. The key is ATTR_GDB_INIT. + */ + public static final String DEBUGGER_GDB_INIT_DEFAULT = ".gdbinit"; //$NON-NLS-1$ + + /** + * Launch configuration attribute value. The key is ATTR_DEBUGGER_AUTO_SOLIB. + */ + public static final boolean DEBUGGER_AUTO_SOLIB_DEFAULT = true; + +// /** +// * Launch configuration attribute value. The key is ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS. +// */ +// public static final boolean DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT = false; +// +// /** +// * Launch configuration attribute key. The value is a string specifying the identifier of the command factory to use. +// */ +// public static final String ATTR_DEBUGGER_COMMAND_FACTORY = GdbPlugin.PLUGIN_ID + ".commandFactory"; //$NON-NLS-1$ +// +// /** +// * Launch configuration attribute key. The value is a string specifying the protocol to +// * use. For now only "mi", "mi1", "m2", "mi3" are supported. +// */ +// public static final String ATTR_DEBUGGER_PROTOCOL = GdbPlugin.PLUGIN_ID + ".protocol"; //$NON-NLS-1$ +// +// /** +// * Launch configuration attribute key. The value is a boolean specifying the mode of the gdb console. +// */ +// public static final String ATTR_DEBUGGER_VERBOSE_MODE = GdbPlugin.PLUGIN_ID + ".verboseMode"; //$NON-NLS-1$ +// +// /** +// * Launch configuration attribute value. The key is ATTR_DEBUGGER_VERBOSE_MODE. +// */ +// public static final boolean DEBUGGER_VERBOSE_MODE_DEFAULT = false; +// /** +// * Launch configuration attribute key. The value is a boolean specifying is debugger should use full pathname to set breakpoints. +// */ +// public static final String ATTR_DEBUGGER_FULLPATH_BREAKPOINTS = GdbPlugin.PLUGIN_ID + ".breakpointsFullPath"; //$NON-NLS-1$ +// +// /** +// * Launch configuration default attribute value. The key is ATTR_DEBUGGER_FULLPATH_BREAKPOINTS. +// */ +// public static final boolean DEBUGGER_FULLPATH_BREAKPOINTS_DEFAULT = false; } diff --git a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/FinalLaunchSequence.java b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/FinalLaunchSequence.java index 7bc6e716809..79f35eddbd3 100644 --- a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/FinalLaunchSequence.java +++ b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/FinalLaunchSequence.java @@ -18,8 +18,6 @@ import org.eclipse.cdt.core.IProcessInfo; import org.eclipse.cdt.core.IProcessList; import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants; import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLookupDirector; -import org.eclipse.cdt.debug.mi.core.IGDBServerMILaunchConfigurationConstants; -import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IProgressMonitor; @@ -32,6 +30,7 @@ import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.concurrent.Sequence; import org.eclipse.dd.dsf.service.DsfServicesTracker; import org.eclipse.dd.gdb.internal.GdbPlugin; +import org.eclipse.dd.gdb.internal.provisional.IGDBLaunchConfigurationConstants; import org.eclipse.dd.gdb.internal.provisional.service.command.GDBControl; import org.eclipse.dd.gdb.internal.provisional.service.command.GDBControl.SessionType; import org.eclipse.dd.mi.service.CSourceLookup; @@ -72,8 +71,8 @@ public class FinalLaunchSequence extends Sequence { new Step() { @Override public void execute(final RequestMonitor requestMonitor) { try { - final String gdbinitFile = fLaunch.getLaunchConfiguration().getAttribute(IMILaunchConfigurationConstants.ATTR_GDB_INIT, - IMILaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT ); + final String gdbinitFile = fLaunch.getLaunchConfiguration().getAttribute(IGDBLaunchConfigurationConstants.ATTR_GDB_INIT, + IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT ); if (gdbinitFile != null && gdbinitFile.length() > 0) { fCommandControl.queueCommand( new CLISource(fCommandControl.getControlDMContext(), gdbinitFile), @@ -84,7 +83,7 @@ public class FinalLaunchSequence extends Sequence { // should not consider this an error. // If it is not the default, then the user must have specified it and // we want to warn the user if we can't find it. - if (!gdbinitFile.equals(IMILaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT )) { + if (!gdbinitFile.equals(IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT )) { requestMonitor.setStatus(getStatus()); } requestMonitor.done(); @@ -119,8 +118,8 @@ public class FinalLaunchSequence extends Sequence { new Step() { @Override public void execute(RequestMonitor requestMonitor) { try { - boolean autolib = fLaunch.getLaunchConfiguration().getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, - IMILaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT); + boolean autolib = fLaunch.getLaunchConfiguration().getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, + IGDBLaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT); fCommandControl.queueCommand( new MIGDBSetAutoSolib(fCommandControl.getControlDMContext(), autolib), new DataRequestMonitor(getExecutor(), requestMonitor)); @@ -136,7 +135,7 @@ public class FinalLaunchSequence extends Sequence { public void execute(RequestMonitor requestMonitor) { try { @SuppressWarnings("unchecked") - List p = fLaunch.getLaunchConfiguration().getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, + List p = fLaunch.getLaunchConfiguration().getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_SOLIB_PATH, new ArrayList(1)); if (p.size() > 0) { String[] paths = p.toArray(new String[p.size()]); @@ -176,7 +175,7 @@ public class FinalLaunchSequence extends Sequence { private boolean checkConnectionType(RequestMonitor requestMonitor) { try { fTcpConnection = fLaunch.getLaunchConfiguration().getAttribute( - IGDBServerMILaunchConfigurationConstants.ATTR_REMOTE_TCP, + IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, false); } catch (CoreException e) { requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot retrieve connection mode", e)); //$NON-NLS-1$ @@ -189,7 +188,7 @@ public class FinalLaunchSequence extends Sequence { private boolean getSerialDevice(RequestMonitor requestMonitor) { try { fSerialDevice = fLaunch.getLaunchConfiguration().getAttribute( - IGDBServerMILaunchConfigurationConstants.ATTR_DEV, "invalid"); //$NON-NLS-1$ + IGDBLaunchConfigurationConstants.ATTR_DEV, "invalid"); //$NON-NLS-1$ } catch (CoreException e) { requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot retrieve serial device", e)); //$NON-NLS-1$ requestMonitor.done(); @@ -201,7 +200,7 @@ public class FinalLaunchSequence extends Sequence { private boolean getTcpHost(RequestMonitor requestMonitor) { try { fRemoteTcpHost = fLaunch.getLaunchConfiguration().getAttribute( - IGDBServerMILaunchConfigurationConstants.ATTR_HOST, "invalid"); //$NON-NLS-1$ + IGDBLaunchConfigurationConstants.ATTR_HOST, "invalid"); //$NON-NLS-1$ } catch (CoreException e) { requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot retrieve remote TCP host", e)); //$NON-NLS-1$ requestMonitor.done(); @@ -213,7 +212,7 @@ public class FinalLaunchSequence extends Sequence { private boolean getTcpPort(RequestMonitor requestMonitor) { try { fRemoteTcpPort = fLaunch.getLaunchConfiguration().getAttribute( - IGDBServerMILaunchConfigurationConstants.ATTR_PORT, "invalid"); //$NON-NLS-1$ + IGDBLaunchConfigurationConstants.ATTR_PORT, "invalid"); //$NON-NLS-1$ } catch (CoreException e) { requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot retrieve remote TCP port", e)); //$NON-NLS-1$ requestMonitor.done(); diff --git a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java index ae4dd0175b9..b5ae8226018 100644 --- a/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java +++ b/plugins/org.eclipse.dd.gdb/src/org/eclipse/dd/gdb/internal/provisional/launching/ServicesLaunchSequence.java @@ -12,7 +12,6 @@ package org.eclipse.dd.gdb.internal.provisional.launching; import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.internal.core.sourcelookup.CSourceLookupDirector; -import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; @@ -20,6 +19,7 @@ import org.eclipse.dd.dsf.concurrent.RequestMonitor; import org.eclipse.dd.dsf.concurrent.Sequence; import org.eclipse.dd.dsf.debug.service.StepQueueManager; import org.eclipse.dd.dsf.service.DsfSession; +import org.eclipse.dd.gdb.internal.provisional.IGDBLaunchConfigurationConstants; import org.eclipse.dd.gdb.internal.provisional.service.GDBRunControl; import org.eclipse.dd.gdb.internal.provisional.service.command.GDBControl; import org.eclipse.dd.gdb.internal.provisional.service.command.GDBControl.SessionType; @@ -130,10 +130,10 @@ public class ServicesLaunchSequence extends Sequence { } private IPath getGDBPath() { - IPath retVal = new Path(IMILaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT); + IPath retVal = new Path(IGDBLaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT); try { - retVal = new Path(fLaunch.getLaunchConfiguration().getAttribute(IMILaunchConfigurationConstants.ATTR_DEBUG_NAME, - IMILaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT)); + retVal = new Path(fLaunch.getLaunchConfiguration().getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME, + IGDBLaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT)); } catch (CoreException e) { } return retVal;