mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
[202353] Clean up the launch features we don't need as per discussion at the CDT summit:
1- "Advanced..." has been removed 2- "Stop on shared library events" has been removed
This commit is contained in:
parent
98ff95d570
commit
51d56390ca
4 changed files with 0 additions and 176 deletions
|
@ -18,9 +18,7 @@ import java.text.Collator;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.IBinaryParser;
|
||||
|
@ -45,7 +43,6 @@ import org.eclipse.dd.gdb.internal.provisional.service.SessionType;
|
|||
import org.eclipse.dd.gdb.internal.ui.GdbUIPlugin;
|
||||
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
|
||||
import org.eclipse.jface.dialogs.Dialog;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.accessibility.AccessibleAdapter;
|
||||
import org.eclipse.swt.accessibility.AccessibleEvent;
|
||||
|
@ -59,80 +56,10 @@ import org.eclipse.swt.layout.GridData;
|
|||
import org.eclipse.swt.layout.GridLayout;
|
||||
import org.eclipse.swt.widgets.Button;
|
||||
import org.eclipse.swt.widgets.Composite;
|
||||
import org.eclipse.swt.widgets.Control;
|
||||
import org.eclipse.swt.widgets.Group;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.swt.widgets.Text;
|
||||
|
||||
public class CDebuggerTab extends AbstractCDebuggerTab {
|
||||
|
||||
public class AdvancedDebuggerOptionsDialog extends Dialog {
|
||||
|
||||
private Button fVarBookKeeping;
|
||||
private Button fRegBookKeeping;
|
||||
|
||||
/**
|
||||
* Constructor for AdvancedDebuggerOptionsDialog.
|
||||
*/
|
||||
protected AdvancedDebuggerOptionsDialog(Shell parentShell) {
|
||||
super(parentShell);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
|
||||
*/
|
||||
@Override
|
||||
protected Control createDialogArea(Composite parent) {
|
||||
Composite composite = (Composite)super.createDialogArea(parent);
|
||||
Group group = new Group(composite, SWT.NONE);
|
||||
group.setText(LaunchMessages.getString("CDebuggerTab.Automatically_track_values_of")); //$NON-NLS-1$
|
||||
GridLayout layout = new GridLayout();
|
||||
group.setLayout(layout);
|
||||
group.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
|
||||
fVarBookKeeping = new Button(group, SWT.CHECK);
|
||||
fVarBookKeeping.setText(LaunchMessages.getString("CDebuggerTab.Variables")); //$NON-NLS-1$
|
||||
fRegBookKeeping = new Button(group, SWT.CHECK);
|
||||
fRegBookKeeping.setText(LaunchMessages.getString("CDebuggerTab.Registers")); //$NON-NLS-1$
|
||||
initialize();
|
||||
return composite;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void okPressed() {
|
||||
saveValues();
|
||||
super.okPressed();
|
||||
}
|
||||
|
||||
private void initialize() {
|
||||
Map<String, Boolean> attr = getAdvancedAttributes();
|
||||
Object varBookkeeping = attr.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING);
|
||||
fVarBookKeeping.setSelection((varBookkeeping instanceof Boolean) ? !((Boolean)varBookkeeping).booleanValue() : true);
|
||||
Object regBookkeeping = attr.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING);
|
||||
fRegBookKeeping.setSelection((regBookkeeping instanceof Boolean) ? !((Boolean)regBookkeeping).booleanValue() : true);
|
||||
}
|
||||
|
||||
private void saveValues() {
|
||||
Map<String, Boolean> attr = getAdvancedAttributes();
|
||||
Boolean varBookkeeping = Boolean.valueOf(!fVarBookKeeping.getSelection());
|
||||
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, varBookkeeping);
|
||||
Boolean regBookkeeping = Boolean.valueOf(!fRegBookKeeping.getSelection());
|
||||
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, regBookkeeping);
|
||||
update();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
|
||||
*/
|
||||
@Override
|
||||
protected void configureShell(Shell newShell) {
|
||||
super.configureShell(newShell);
|
||||
newShell.setText(LaunchMessages.getString("CDebuggerTab.Advanced_Options_Dialog_Title")); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
private final static String LOCAL_DEBUGGER_ID = "org.eclipse.dd.gdb.GdbDebugger";//$NON-NLS-1$
|
||||
private final static String REMOTE_DEBUGGER_ID = "org.eclipse.dd.gdb.GdbServerDebugger";//$NON-NLS-1$
|
||||
|
@ -140,12 +67,9 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
protected boolean fAttachMode = false;
|
||||
protected boolean fRemoteMode = false;
|
||||
|
||||
protected Button fAdvancedButton;
|
||||
protected Button fStopInMain;
|
||||
protected Text fStopInMainSymbol;
|
||||
|
||||
private Map<String, Boolean> fAdvancedAttributes = new HashMap<String, Boolean>(5);
|
||||
|
||||
private ScrolledComposite fContainer;
|
||||
|
||||
private Composite fContents;
|
||||
|
@ -251,8 +175,6 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN,
|
||||
ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_DEFAULT);
|
||||
}
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, false);
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, false);
|
||||
|
||||
// Set the default debugger based on the active toolchain on the project (if possible)
|
||||
String defaultDebugger = null;
|
||||
|
@ -327,8 +249,6 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
fStopInMainSymbol.getText());
|
||||
|
||||
}
|
||||
|
||||
applyAdvancedAttributes(config);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -469,50 +389,6 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
}
|
||||
);
|
||||
}
|
||||
fAdvancedButton = createPushButton(optionsComp, LaunchMessages.getString("CDebuggerTab.Advanced"), null); //$NON-NLS-1$
|
||||
((GridData)fAdvancedButton.getLayoutData()).horizontalAlignment = GridData.END;
|
||||
fAdvancedButton.addSelectionListener(
|
||||
new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent e) {
|
||||
Dialog dialog = new AdvancedDebuggerOptionsDialog(getShell());
|
||||
dialog.open();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
protected Map<String, Boolean> getAdvancedAttributes() {
|
||||
return fAdvancedAttributes;
|
||||
}
|
||||
|
||||
private void initializeAdvancedAttributes(ILaunchConfiguration config) {
|
||||
Map<String, Boolean> attr = getAdvancedAttributes();
|
||||
try {
|
||||
boolean varBookkeeping = (config.getAttribute(
|
||||
ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, false))
|
||||
? true : false;
|
||||
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING, varBookkeeping);
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
try {
|
||||
Boolean regBookkeeping = (config.getAttribute(
|
||||
ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, false))
|
||||
? true :false;
|
||||
attr.put(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING, regBookkeeping);
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
}
|
||||
|
||||
private void applyAdvancedAttributes(ILaunchConfigurationWorkingCopy config) {
|
||||
Map<String, Boolean> attr = getAdvancedAttributes();
|
||||
Object varBookkeeping = attr.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING);
|
||||
if (varBookkeeping instanceof Boolean)
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_VARIABLE_BOOKKEEPING,
|
||||
((Boolean)varBookkeeping).booleanValue());
|
||||
Object regBookkeeping = attr.get(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING);
|
||||
if (regBookkeeping instanceof Boolean)
|
||||
config.setAttribute(ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_ENABLE_REGISTER_BOOKKEEPING,
|
||||
((Boolean)regBookkeeping).booleanValue());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -527,7 +403,6 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
*/
|
||||
@Override
|
||||
public void dispose() {
|
||||
getAdvancedAttributes().clear();
|
||||
ICDebuggerPage debuggerPage = getDynamicTab();
|
||||
if (debuggerPage != null)
|
||||
debuggerPage.dispose();
|
||||
|
@ -548,7 +423,6 @@ public class CDebuggerTab extends AbstractCDebuggerTab {
|
|||
if (getDebugConfig().getID().equals(REMOTE_DEBUGGER_ID)) fRemoteMode = true;
|
||||
else fRemoteMode = false;
|
||||
}
|
||||
initializeAdvancedAttributes(config);
|
||||
} catch (CoreException e) {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,23 +37,18 @@ public class GDBSolibBlock extends Observable implements IMILaunchConfigurationC
|
|||
|
||||
private Button fAutoSoLibButton;
|
||||
|
||||
private Button fStopOnSolibEventsButton;
|
||||
|
||||
private Button fUseSolibForAppButton;
|
||||
|
||||
private Composite fControl;
|
||||
|
||||
private boolean fAutoSolib = false;
|
||||
|
||||
private boolean fStopOnSolibEvents = false;
|
||||
|
||||
private boolean fUseSolibForApp = true;
|
||||
|
||||
public GDBSolibBlock( IMILaunchConfigurationComponent solibSearchBlock, boolean autoSolib, boolean stopOnSolibEvents ) {
|
||||
super();
|
||||
fSolibSearchPathBlock = solibSearchBlock;
|
||||
fAutoSolib = autoSolib;
|
||||
fStopOnSolibEvents = stopOnSolibEvents;
|
||||
}
|
||||
|
||||
public void createControl( Composite parent ) {
|
||||
|
@ -77,17 +72,6 @@ public class GDBSolibBlock extends Observable implements IMILaunchConfigurationC
|
|||
}
|
||||
} );
|
||||
}
|
||||
if ( fStopOnSolibEvents ) {
|
||||
fStopOnSolibEventsButton = ControlFactory.createCheckBox( subComp, LaunchUIMessages.getString( "GDBSolibBlock.1" ) ); //$NON-NLS-1$
|
||||
fStopOnSolibEventsButton.addSelectionListener( new SelectionAdapter() {
|
||||
|
||||
@Override
|
||||
public void widgetSelected( SelectionEvent e ) {
|
||||
updateButtons();
|
||||
changed();
|
||||
}
|
||||
} );
|
||||
}
|
||||
if ( fUseSolibForApp ) {
|
||||
fUseSolibForAppButton = ControlFactory.createCheckBox( subComp, LaunchUIMessages.getString( "GDBSolibBlock.2" ) ); //$NON-NLS-1$
|
||||
fUseSolibForAppButton.addSelectionListener( new SelectionAdapter() {
|
||||
|
@ -108,8 +92,6 @@ public class GDBSolibBlock extends Observable implements IMILaunchConfigurationC
|
|||
try {
|
||||
if ( fAutoSoLibButton != null )
|
||||
fAutoSoLibButton.setSelection( configuration.getAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IGDBLaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT ) );
|
||||
if ( fStopOnSolibEventsButton != null )
|
||||
fStopOnSolibEventsButton.setSelection( configuration.getAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, IGDBLaunchConfigurationConstants.DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT ) );
|
||||
if ( fUseSolibForAppButton != null )
|
||||
fUseSolibForAppButton.setSelection( configuration.getAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP, IGDBLaunchConfigurationConstants.DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP_DEFAULT ) );
|
||||
initializeButtons( configuration );
|
||||
|
@ -128,8 +110,6 @@ public class GDBSolibBlock extends Observable implements IMILaunchConfigurationC
|
|||
|
||||
if ( fAutoSoLibButton != null )
|
||||
attrs.put( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, Boolean.valueOf( fAutoSoLibButton.getSelection() ) );
|
||||
if ( fStopOnSolibEventsButton != null )
|
||||
attrs.put( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, Boolean.valueOf( fStopOnSolibEventsButton.getSelection() ) );
|
||||
if ( fUseSolibForAppButton != null )
|
||||
attrs.put( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP, Boolean.valueOf( fUseSolibForAppButton.getSelection() ) );
|
||||
configuration.setAttributes( attrs );
|
||||
|
@ -142,7 +122,6 @@ public class GDBSolibBlock extends Observable implements IMILaunchConfigurationC
|
|||
if ( fSolibSearchPathBlock != null )
|
||||
fSolibSearchPathBlock.setDefaults( configuration );
|
||||
configuration.setAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IGDBLaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT );
|
||||
configuration.setAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS, IGDBLaunchConfigurationConstants.DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT );
|
||||
configuration.setAttribute( IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP, IGDBLaunchConfigurationConstants.DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP_DEFAULT );
|
||||
}
|
||||
|
||||
|
@ -172,8 +151,6 @@ public class GDBSolibBlock extends Observable implements IMILaunchConfigurationC
|
|||
boolean enable = !ICDTLaunchConfigurationConstants.DEBUGGER_MODE_CORE.equals( configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_START_MODE, "" ) ); //$NON-NLS-1$
|
||||
if ( fAutoSoLibButton != null )
|
||||
fAutoSoLibButton.setEnabled( enable );
|
||||
if ( fStopOnSolibEventsButton != null )
|
||||
fStopOnSolibEventsButton.setEnabled( enable );
|
||||
if ( fUseSolibForAppButton != null )
|
||||
fUseSolibForAppButton.setEnabled( enable );
|
||||
}
|
||||
|
|
|
@ -60,11 +60,6 @@ public class IGDBLaunchConfigurationConstants {
|
|||
*/
|
||||
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. Boolean value to set the 'use shared library symbols for application' flag of the debugger.
|
||||
* @since 1.1
|
||||
|
@ -102,11 +97,6 @@ public class IGDBLaunchConfigurationConstants {
|
|||
*/
|
||||
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 value. The key is ATTR_DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP.
|
||||
* @since 1.1
|
||||
|
|
|
@ -54,7 +54,6 @@ import org.eclipse.dd.mi.service.command.commands.MIGDBSetAutoSolib;
|
|||
import org.eclipse.dd.mi.service.command.commands.MIGDBSetBreakpointApply;
|
||||
import org.eclipse.dd.mi.service.command.commands.MIGDBSetNonStop;
|
||||
import org.eclipse.dd.mi.service.command.commands.MIGDBSetSolibSearchPath;
|
||||
import org.eclipse.dd.mi.service.command.commands.MIGDBSetStopOnSolibEvents;
|
||||
import org.eclipse.dd.mi.service.command.commands.MITargetSelect;
|
||||
import org.eclipse.dd.mi.service.command.commands.RawCommand;
|
||||
import org.eclipse.dd.mi.service.command.output.MIInfo;
|
||||
|
@ -311,22 +310,6 @@ public class FinalLaunchSequence extends Sequence {
|
|||
requestMonitor.done();
|
||||
}
|
||||
}},
|
||||
/*
|
||||
* Tell GDB to stop or not on shared library events
|
||||
*/
|
||||
new Step() { @Override
|
||||
public void execute(RequestMonitor requestMonitor) {
|
||||
try {
|
||||
boolean stopOnSolibEvents = fLaunch.getLaunchConfiguration().getAttribute(IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_ON_SOLIB_EVENTS,
|
||||
IGDBLaunchConfigurationConstants.DEBUGGER_STOP_ON_SOLIB_EVENTS_DEFAULT);
|
||||
fCommandControl.queueCommand(
|
||||
new MIGDBSetStopOnSolibEvents(fCommandControl.getContext(), stopOnSolibEvents),
|
||||
new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor));
|
||||
} catch (CoreException e) {
|
||||
requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot set shared library option", e)); //$NON-NLS-1$
|
||||
requestMonitor.done();
|
||||
}
|
||||
}},
|
||||
/*
|
||||
* Set the shared library paths
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue