diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
index 2f74158a750..50aa7a03ba2 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 QNX Software Systems and others.
+ * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -150,7 +150,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
private ArrayList fThreads;
/**
- * Associated inferrior process, or null
if not available.
+ * Associated inferior process, or null
if not available.
*/
private IProcess fDebuggeeProcess = null;
@@ -793,7 +793,8 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
*/
- public ILaunch getLaunch() {
+ @Override
+ public ILaunch getLaunch() {
return fLaunch;
}
@@ -832,7 +833,8 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
/* (non-Javadoc)
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
*/
- public Object getAdapter( Class adapter ) {
+ @Override
+ public Object getAdapter( Class adapter ) {
if ( adapter.equals( ICDebugElement.class ) )
return this;
if ( adapter.equals( CDebugElement.class ) )
@@ -1622,7 +1624,8 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
- public String toString() {
+ @Override
+ public String toString() {
String result = ""; //$NON-NLS-1$
try {
result = getName();
@@ -1697,8 +1700,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
* @see org.eclipse.cdt.debug.core.model.ISteppingModeTarget#isInstructionSteppingEnabled()
*/
public boolean isInstructionSteppingEnabled() {
- return fPreferences.getBoolean( PREF_INSTRUCTION_STEPPING_MODE ) ||
- CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_INSTRUCTION_STEP_MODE_ON );
+ return fPreferences.getBoolean( PREF_INSTRUCTION_STEPPING_MODE );
}
/* (non-Javadoc)
@@ -1710,10 +1712,15 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
private void initializePreferences() {
fPreferences = new Preferences();
- fPreferences.setDefault( PREF_INSTRUCTION_STEPPING_MODE, false );
+ fPreferences.setDefault( PREF_INSTRUCTION_STEPPING_MODE, CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_INSTRUCTION_STEP_MODE_ON ));
}
private void disposePreferences() {
+ if (fPreferences != null) {
+ // persist current instruction stepping mode
+ CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_INSTRUCTION_STEP_MODE_ON, fPreferences.getBoolean( PREF_INSTRUCTION_STEPPING_MODE ) );
+ CDebugCorePlugin.getDefault().savePluginPreferences();
+ }
fPreferences = null;
}
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleInstructionStepModeActionDelegate.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleInstructionStepModeActionDelegate.java
index ddf77ac151d..4f86b027b72 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleInstructionStepModeActionDelegate.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/actions/ToggleInstructionStepModeActionDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2008 QNX Software Systems and others.
+ * Copyright (c) 2004, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -98,7 +98,7 @@ public class ToggleInstructionStepModeActionDelegate extends ActionDelegate impl
target.enableInstructionStepping( enabled );
if ( enabled && target instanceof ICDebugTarget ) {
try {
- getView().getSite().getPage().showView( ICDebugUIConstants.ID_DISASSEMBLY_VIEW );
+ getView().getSite().getPage().showView( ICDebugUIConstants.ID_DSF_DISASSEMBLY_VIEW );
}
catch( PartInitException e ) {
CDebugUIPlugin.log( e.getStatus() );
diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/ICDebugUIConstants.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/ICDebugUIConstants.java
index f403b3d17c4..009a3fd799c 100644
--- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/ICDebugUIConstants.java
+++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/ui/ICDebugUIConstants.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2005 QNX Software Systems and others.
+ * Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -29,9 +29,17 @@ public interface ICDebugUIConstants {
/**
* Disassembly view identifier (value "org.eclipse.cdt.debug.ui.DisassemblyView"
).
+ * @deprecated As of CDT 7.0 replaced by the DSF Disassembly view ("org.eclipse.cdt.dsf.debug.ui.disassembly.view")
*/
+ @Deprecated
public static final String ID_DISASSEMBLY_VIEW = PREFIX + "DisassemblyView"; //$NON-NLS-1$
+ /**
+ * Disassembly view identifier (value "org.eclipse.cdt.dsf.debug.ui.disassembly.view"
).
+ * @since 7.0
+ */
+ public static final String ID_DSF_DISASSEMBLY_VIEW = "org.eclipse.cdt.dsf.debug.ui.disassembly.view"; //$NON-NLS-1$
+
/**
* Signals view identifier (value "org.eclipse.cdt.debug.ui.SignalsView"
).
* @since 6.0