mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 09:16:02 +02:00
Bug 312848: Remove CDI-GDB pref to enable distinct code and data spaces
This commit is contained in:
parent
8b8214494e
commit
b3ddbdf187
5 changed files with 2 additions and 44 deletions
|
@ -39,7 +39,6 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDIGlobalVariableDescriptor;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIInstruction;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDILineBreakpoint;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDILineBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIMemoryBlock;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIMemorySpaceManagement;
|
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIMixedInstruction;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIRegister;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIRegister;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterDescriptor;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIRegisterDescriptor;
|
||||||
|
@ -54,10 +53,8 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDIThread;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
|
||||||
import org.eclipse.cdt.debug.core.model.ICBreakpointType;
|
import org.eclipse.cdt.debug.core.model.ICBreakpointType;
|
||||||
import org.eclipse.cdt.debug.mi.core.CoreProcess;
|
import org.eclipse.cdt.debug.mi.core.CoreProcess;
|
||||||
import org.eclipse.cdt.debug.mi.core.IMIConstants;
|
|
||||||
import org.eclipse.cdt.debug.mi.core.MIException;
|
import org.eclipse.cdt.debug.mi.core.MIException;
|
||||||
import org.eclipse.cdt.debug.mi.core.MIInferior;
|
import org.eclipse.cdt.debug.mi.core.MIInferior;
|
||||||
import org.eclipse.cdt.debug.mi.core.MIPlugin;
|
|
||||||
import org.eclipse.cdt.debug.mi.core.MISession;
|
import org.eclipse.cdt.debug.mi.core.MISession;
|
||||||
import org.eclipse.cdt.debug.mi.core.RxThread;
|
import org.eclipse.cdt.debug.mi.core.RxThread;
|
||||||
import org.eclipse.cdt.debug.mi.core.cdi.BreakpointManager;
|
import org.eclipse.cdt.debug.mi.core.cdi.BreakpointManager;
|
||||||
|
@ -102,7 +99,7 @@ import org.eclipse.cdt.debug.mi.core.output.MIThreadSelectInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public class Target extends SessionObject implements ICDITarget, ICDIBreakpointManagement3, ICDIAddressToSource, ICDIMemorySpaceManagement, ICDIExecuteMoveInstructionPointer {
|
public class Target extends SessionObject implements ICDITarget, ICDIBreakpointManagement3, ICDIAddressToSource, ICDIExecuteMoveInstructionPointer {
|
||||||
|
|
||||||
MISession miSession;
|
MISession miSession;
|
||||||
ICDITargetConfiguration fConfiguration;
|
ICDITargetConfiguration fConfiguration;
|
||||||
|
@ -1323,24 +1320,6 @@ public class Target extends SessionObject implements ICDITarget, ICDIBreakpointM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String addressToString(BigInteger address, String memorySpaceID) {
|
|
||||||
return null; // use CDT's built-in encoding/decoding <memspace>:<addr-hex>
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigInteger stringToAddress(String str, StringBuffer memorySpaceID_out)
|
|
||||||
throws CDIException {
|
|
||||||
return null; // use CDT's built-in encoding/decoding <memspace>:<addr-hex>
|
|
||||||
}
|
|
||||||
|
|
||||||
public String[] getMemorySpaces() {
|
|
||||||
if (MIPlugin.getDefault().getPluginPreferences().getBoolean(IMIConstants.PREF_ENABLE_MEMORY_SPACES)) {
|
|
||||||
return new String[] { CODE_MEMORY_SPACE, DATA_MEMORY_SPACE };
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return new String[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public ICDIEventBreakpoint setEventBreakpoint(String type, String arg, int cdiType, ICDICondition condition, boolean deferred,
|
public ICDIEventBreakpoint setEventBreakpoint(String type, String arg, int cdiType, ICDICondition condition, boolean deferred,
|
||||||
boolean enabled) throws CDIException {
|
boolean enabled) throws CDIException {
|
||||||
BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
|
BreakpointManager bMgr = ((Session)getSession()).getBreakpointManager();
|
||||||
|
|
|
@ -63,18 +63,5 @@ public interface IMIConstants
|
||||||
* The default value of the for <code>PREF_SHARED_LIBRARIES_AUTO_REFRESH</code> property
|
* The default value of the for <code>PREF_SHARED_LIBRARIES_AUTO_REFRESH</code> property
|
||||||
*/
|
*/
|
||||||
public static final boolean DEF_PREF_SHARED_LIBRARIES_AUTO_REFRESH = true;
|
public static final boolean DEF_PREF_SHARED_LIBRARIES_AUTO_REFRESH = true;
|
||||||
|
|
||||||
/**
|
|
||||||
* Boolean preference controlling whether memory spaces will be supported.
|
|
||||||
* gdb has implicit awareness of two memory spaces: "code" and "data". Most
|
|
||||||
* users don't need that capability, though, and so we expose it in the UI
|
|
||||||
* only if the user turns it on.
|
|
||||||
*/
|
|
||||||
public static final String PREF_ENABLE_MEMORY_SPACES = PLUGIN_ID + ".PREF_ENABLE_MEMORY_SPACES"; //$NON-NLS-1$
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The default value of the for <code>PREF_ENABLE_MEMORY_SPACES</code> property
|
|
||||||
*/
|
|
||||||
public static final boolean DEF_PREF_ENABLE_MEMORY_SPACES = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,5 @@ public class MIPreferenceInitializer extends AbstractPreferenceInitializer {
|
||||||
MIPlugin.getDefault().getPluginPreferences().setDefault(IMIConstants.PREF_REQUEST_TIMEOUT, IMIConstants.DEF_REQUEST_TIMEOUT);
|
MIPlugin.getDefault().getPluginPreferences().setDefault(IMIConstants.PREF_REQUEST_TIMEOUT, IMIConstants.DEF_REQUEST_TIMEOUT);
|
||||||
MIPlugin.getDefault().getPluginPreferences().setDefault(IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT, IMIConstants.DEF_REQUEST_LAUNCH_TIMEOUT);
|
MIPlugin.getDefault().getPluginPreferences().setDefault(IMIConstants.PREF_REQUEST_LAUNCH_TIMEOUT, IMIConstants.DEF_REQUEST_LAUNCH_TIMEOUT);
|
||||||
MIPlugin.getDefault().getPluginPreferences().setDefault(IMIConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH, IMIConstants.DEF_PREF_SHARED_LIBRARIES_AUTO_REFRESH);
|
MIPlugin.getDefault().getPluginPreferences().setDefault(IMIConstants.PREF_SHARED_LIBRARIES_AUTO_REFRESH, IMIConstants.DEF_PREF_SHARED_LIBRARIES_AUTO_REFRESH);
|
||||||
MIPlugin.getDefault().getPluginPreferences().setDefault(IMIConstants.PREF_ENABLE_MEMORY_SPACES, IMIConstants.DEF_PREF_ENABLE_MEMORY_SPACES);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -327,8 +327,6 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
|
||||||
|
|
||||||
private BooleanFieldEditor fRefreshSolibsButton;
|
private BooleanFieldEditor fRefreshSolibsButton;
|
||||||
|
|
||||||
private BooleanFieldEditor fMemorySpacesButton;
|
|
||||||
|
|
||||||
private MIPreferenceStore fMICorePreferenceStore = new MIPreferenceStore( MIPlugin.getDefault().getPluginPreferences() );
|
private MIPreferenceStore fMICorePreferenceStore = new MIPreferenceStore( MIPlugin.getDefault().getPluginPreferences() );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -360,8 +358,6 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
|
||||||
composite.setLayoutData( data );
|
composite.setLayoutData( data );
|
||||||
createSpacer( composite, 1 );
|
createSpacer( composite, 1 );
|
||||||
createCommunicationPreferences( composite );
|
createCommunicationPreferences( composite );
|
||||||
createSpacer( composite, 1 );
|
|
||||||
fMemorySpacesButton = createCheckbox(IMIConstants.PREF_ENABLE_MEMORY_SPACES, PreferenceMessages.getString( "MIPreferencePage.7" ), composite ); //$NON-NLS-1$
|
|
||||||
return composite;
|
return composite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -402,7 +398,6 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
|
||||||
fDebugTimeoutText.loadDefault();
|
fDebugTimeoutText.loadDefault();
|
||||||
fLaunchTimeoutText.loadDefault();
|
fLaunchTimeoutText.loadDefault();
|
||||||
fRefreshSolibsButton.loadDefault();
|
fRefreshSolibsButton.loadDefault();
|
||||||
fMemorySpacesButton.loadDefault();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -444,7 +439,6 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
|
||||||
fDebugTimeoutText.store();
|
fDebugTimeoutText.store();
|
||||||
fLaunchTimeoutText.store();
|
fLaunchTimeoutText.store();
|
||||||
fRefreshSolibsButton.store();
|
fRefreshSolibsButton.store();
|
||||||
fMemorySpacesButton.store();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private MIIntegerFieldEditor createTimeoutField( String preference, String label, Composite parent ) {
|
private MIIntegerFieldEditor createTimeoutField( String preference, String label, Composite parent ) {
|
||||||
|
@ -482,7 +476,6 @@ public class MIPreferencePage extends PreferencePage implements IWorkbenchPrefer
|
||||||
fDebugTimeoutText.dispose();
|
fDebugTimeoutText.dispose();
|
||||||
fLaunchTimeoutText.dispose();
|
fLaunchTimeoutText.dispose();
|
||||||
fRefreshSolibsButton.dispose();
|
fRefreshSolibsButton.dispose();
|
||||||
fMemorySpacesButton.dispose();
|
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,4 @@ MIPreferencePage.2=&Debugger timeout (ms):
|
||||||
MIPreferencePage.3=&Launch timeout (ms):
|
MIPreferencePage.3=&Launch timeout (ms):
|
||||||
MIPreferencePage.4=Value must be an integer between {0} and {1}.
|
MIPreferencePage.4=Value must be an integer between {0} and {1}.
|
||||||
MIPreferencePage.6=Automatically refresh modules
|
MIPreferencePage.6=Automatically refresh modules
|
||||||
MIPreferencePage.7=Support distinct code and data memory spaces
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue