mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-28 11:25:35 +02:00
[249227] we are not quite ready with the "verbose console feature", but since I had the changes needed to add the option in the launch, I figure I'd commit them. Once we have the feature ready, we'll just have to hook them to the launch option.
This commit is contained in:
parent
be2a572842
commit
405b19f8df
3 changed files with 59 additions and 30 deletions
|
@ -46,6 +46,8 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
|
||||||
protected Text fGDBCommandText;
|
protected Text fGDBCommandText;
|
||||||
protected Text fGDBInitText;
|
protected Text fGDBInitText;
|
||||||
protected Button fNonStopCheckBox;
|
protected Button fNonStopCheckBox;
|
||||||
|
protected Button fVerboseModeButton;
|
||||||
|
|
||||||
private IMILaunchConfigurationComponent fSolibBlock;
|
private IMILaunchConfigurationComponent fSolibBlock;
|
||||||
private boolean fIsInitializing = false;
|
private boolean fIsInitializing = false;
|
||||||
|
|
||||||
|
@ -67,6 +69,8 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
|
||||||
IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT);
|
IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT);
|
||||||
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP,
|
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP,
|
||||||
IGDBLaunchConfigurationConstants.DEBUGGER_NON_STOP_DEFAULT);
|
IGDBLaunchConfigurationConstants.DEBUGGER_NON_STOP_DEFAULT);
|
||||||
|
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE,
|
||||||
|
IGDBLaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT);
|
||||||
|
|
||||||
if (fSolibBlock != null)
|
if (fSolibBlock != null)
|
||||||
fSolibBlock.setDefaults(configuration);
|
fSolibBlock.setDefaults(configuration);
|
||||||
|
@ -91,6 +95,7 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
|
||||||
String gdbCommand = IGDBLaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT;
|
String gdbCommand = IGDBLaunchConfigurationConstants.DEBUGGER_DEBUG_NAME_DEFAULT;
|
||||||
String gdbInit = IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT;
|
String gdbInit = IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT;
|
||||||
boolean nonStopMode = IGDBLaunchConfigurationConstants.DEBUGGER_NON_STOP_DEFAULT;
|
boolean nonStopMode = IGDBLaunchConfigurationConstants.DEBUGGER_NON_STOP_DEFAULT;
|
||||||
|
boolean verboseMode = IGDBLaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
gdbCommand = configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME,
|
gdbCommand = configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUG_NAME,
|
||||||
|
@ -111,12 +116,19 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
|
||||||
}
|
}
|
||||||
catch(CoreException e) {
|
catch(CoreException e) {
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
|
verboseMode = configuration.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE,
|
||||||
|
IGDBLaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT );
|
||||||
|
}
|
||||||
|
catch(CoreException e) {
|
||||||
|
}
|
||||||
|
|
||||||
if (fSolibBlock != null)
|
if (fSolibBlock != null)
|
||||||
fSolibBlock.initializeFrom(configuration);
|
fSolibBlock.initializeFrom(configuration);
|
||||||
fGDBCommandText.setText(gdbCommand);
|
fGDBCommandText.setText(gdbCommand);
|
||||||
fGDBInitText.setText(gdbInit);
|
fGDBInitText.setText(gdbInit);
|
||||||
fNonStopCheckBox.setSelection(nonStopMode);
|
fNonStopCheckBox.setSelection(nonStopMode);
|
||||||
|
fVerboseModeButton.setSelection(verboseMode);
|
||||||
|
|
||||||
setInitializing(false);
|
setInitializing(false);
|
||||||
}
|
}
|
||||||
|
@ -128,6 +140,8 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
|
||||||
fGDBInitText.getText().trim());
|
fGDBInitText.getText().trim());
|
||||||
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP,
|
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP,
|
||||||
fNonStopCheckBox.getSelection());
|
fNonStopCheckBox.getSelection());
|
||||||
|
configuration.setAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE,
|
||||||
|
fVerboseModeButton.getSelection() );
|
||||||
|
|
||||||
if (fSolibBlock != null)
|
if (fSolibBlock != null)
|
||||||
fSolibBlock.performApply(configuration);
|
fSolibBlock.performApply(configuration);
|
||||||
|
@ -276,6 +290,29 @@ public class GdbDebuggerPage extends AbstractCDebuggerPage implements Observer {
|
||||||
updateLaunchConfigurationDialog();
|
updateLaunchConfigurationDialog();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
fVerboseModeButton = ControlFactory.createCheckBox( subComp, LaunchUIMessages.getString( "StandardGDBDebuggerPage.13" ) ); //$NON-NLS-1$
|
||||||
|
fVerboseModeButton.addSelectionListener(new SelectionAdapter() {
|
||||||
|
@Override
|
||||||
|
public void widgetDefaultSelected(SelectionEvent e) {
|
||||||
|
if (!isInitializing())
|
||||||
|
updateLaunchConfigurationDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void widgetSelected(SelectionEvent e) {
|
||||||
|
if (!isInitializing())
|
||||||
|
updateLaunchConfigurationDialog();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// fit options one per line
|
||||||
|
gd = new GridData();
|
||||||
|
gd.horizontalSpan = 3;
|
||||||
|
fNonStopCheckBox.setLayoutData(gd);
|
||||||
|
gd = new GridData();
|
||||||
|
gd.horizontalSpan = 3;
|
||||||
|
fVerboseModeButton.setLayoutData(gd);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void createSolibTab(TabFolder tabFolder) {
|
public void createSolibTab(TabFolder tabFolder) {
|
||||||
|
|
|
@ -76,6 +76,12 @@ public class IGDBLaunchConfigurationConstants {
|
||||||
*/
|
*/
|
||||||
public static final String ATTR_DEBUGGER_AUTO_SOLIB_LIST = GdbPlugin.PLUGIN_ID + ".AUTO_SOLIB_LIST"; //$NON-NLS-1$
|
public static final String ATTR_DEBUGGER_AUTO_SOLIB_LIST = GdbPlugin.PLUGIN_ID + ".AUTO_SOLIB_LIST"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Launch configuration attribute key. The value is a boolean specifying the mode of the gdb console.
|
||||||
|
* @since 1.1
|
||||||
|
*/
|
||||||
|
public static final String ATTR_DEBUGGER_VERBOSE_MODE = GdbPlugin.PLUGIN_ID + ".verboseMode"; //$NON-NLS-1$
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Launch configuration attribute value. The key is ATTR_DEBUG_NAME.
|
* Launch configuration attribute value. The key is ATTR_DEBUG_NAME.
|
||||||
*/
|
*/
|
||||||
|
@ -103,33 +109,9 @@ public class IGDBLaunchConfigurationConstants {
|
||||||
*/
|
*/
|
||||||
public static final boolean DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP_DEFAULT = false;
|
public static final boolean DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP_DEFAULT = false;
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * Launch configuration attribute key. The value is a string specifying the identifier of the command factory to use.
|
* Launch configuration attribute value. The key is ATTR_DEBUGGER_VERBOSE_MODE.
|
||||||
// */
|
* @since 1.1
|
||||||
// public static final String ATTR_DEBUGGER_COMMAND_FACTORY = GdbPlugin.PLUGIN_ID + ".commandFactory"; //$NON-NLS-1$
|
*/
|
||||||
//
|
public static final boolean DEBUGGER_VERBOSE_MODE_DEFAULT = false;
|
||||||
// /**
|
|
||||||
// * 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;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,6 +273,16 @@ public class LaunchUtils {
|
||||||
}
|
}
|
||||||
return SessionType.LOCAL;
|
return SessionType.LOCAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean getConsoleVerboseMode(ILaunchConfiguration config) {
|
||||||
|
boolean verboseMode = IGDBLaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT;
|
||||||
|
try {
|
||||||
|
verboseMode = config.getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_VERBOSE_MODE,
|
||||||
|
IGDBLaunchConfigurationConstants.DEBUGGER_VERBOSE_MODE_DEFAULT);
|
||||||
|
} catch (CoreException e) {
|
||||||
|
}
|
||||||
|
return verboseMode;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue