diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index 3b4842aa0ef..724091f32c8 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,9 @@ +2005-06-12 Mikhail Khodjaiants + Temporary fix for bug 79872: Make instruction stepping default in disassembly view. + * ICDebugConstants.java + * CDebugCorePreferenceInitializer.java + * CDebugTarget.java + 2005-06-09 Mikhail Khodjaiants Bug 94139: User-defined register groups. Don't save the list of registers for default groups. diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDebugConstants.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDebugConstants.java index a2d558c24c9..8c73c2fa5a0 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDebugConstants.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDebugConstants.java @@ -11,41 +11,43 @@ package org.eclipse.cdt.debug.core; /** - * * Constant definitions for C/C++ debug plug-in. - * - * @since: Oct 15, 2002 */ -public interface ICDebugConstants -{ +public interface ICDebugConstants { + /** - * C/C++ debug plug-in identifier (value "org.eclipse.cdt.debug.core"). + * C/C++ debug plug-in identifier (value + * "org.eclipse.cdt.debug.core"). */ public static final String PLUGIN_ID = CDebugCorePlugin.getUniqueIdentifier(); /** - * The identifier of the default variable format to use in the variables view + * The identifier of the default variable format to use in the variables + * view */ public static final String PREF_DEFAULT_VARIABLE_FORMAT = PLUGIN_ID + "cDebug.default_variable_format"; //$NON-NLS-1$ /** - * The identifier of the default register format to use in the registers view + * The identifier of the default register format to use in the registers + * view */ public static final String PREF_DEFAULT_REGISTER_FORMAT = PLUGIN_ID + "cDebug.default_register_format"; //$NON-NLS-1$ /** - * The identifier of the default expression format to use in the expressions views + * The identifier of the default expression format to use in the expressions + * views */ public static final String PREF_DEFAULT_EXPRESSION_FORMAT = PLUGIN_ID + "cDebug.default_expression_format"; //$NON-NLS-1$ /** - * The identifier of the maximum number of instructions displayed in disassembly. + * The identifier of the maximum number of instructions displayed in + * disassembly. */ public static final String PREF_MAX_NUMBER_OF_INSTRUCTIONS = PLUGIN_ID + "cDebug.max_number_of_instructions"; //$NON-NLS-1$ /** - * Boolean preference controlling whether the search for duplicate source files - * will be performed by debugger. + * Boolean preference controlling whether the search for duplicate source + * files will be performed by debugger. */ public static final String PREF_SEARCH_DUPLICATE_FILES = PLUGIN_ID + "cDebug.Source.search_duplicate_files"; //$NON-NLS-1$ @@ -55,17 +57,24 @@ public interface ICDebugConstants public static final String PREF_SOURCE_LOCATIONS = PLUGIN_ID + "cDebug.Source.source_locations"; //$NON-NLS-1$ /** - * The default number of instructions displayed in disassembly. + * The default number of instructions displayed in disassembly. */ public static final int DEF_NUMBER_OF_INSTRUCTIONS = 100; /** - * The minimal valid number of instructions displayed in disassembly. + * The minimal valid number of instructions displayed in disassembly. */ public static final int MIN_NUMBER_OF_INSTRUCTIONS = 1; /** - * The maximal valid number of instructions displayed in disassembly. + * The maximal valid number of instructions displayed in disassembly. */ public static final int MAX_NUMBER_OF_INSTRUCTIONS = 999; + + /** + * Boolean preference controlling whether the instruction stepping mode should be activated. + * + * Temporary. See bugs 79872 and 80323. + */ + public static final String PREF_INSTRUCTION_STEP_MODE_ON = PLUGIN_ID + "cDebug.Disassembly.instructionStepOn"; //$NON-NLS-1$ } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugCorePreferenceInitializer.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugCorePreferenceInitializer.java index 7baac12e4f9..63584986104 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugCorePreferenceInitializer.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CDebugCorePreferenceInitializer.java @@ -35,5 +35,6 @@ public class CDebugCorePreferenceInitializer extends AbstractPreferenceInitializ CDebugCorePlugin.getDefault().getPluginPreferences().setDefault( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT, ICDIFormat.NATURAL ); CDebugCorePlugin.getDefault().getPluginPreferences().setDefault( ICDebugConstants.PREF_DEFAULT_EXPRESSION_FORMAT, ICDIFormat.NATURAL ); CDebugCorePlugin.getDefault().getPluginPreferences().setDefault( ICDebugConstants.PREF_DEFAULT_REGISTER_FORMAT, ICDIFormat.NATURAL ); + CDebugCorePlugin.getDefault().getPluginPreferences().setDefault( ICDebugConstants.PREF_INSTRUCTION_STEP_MODE_ON, false ); } } 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 c03eb8839d7..540868738cb 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 @@ -23,6 +23,7 @@ import org.eclipse.cdt.core.IBinaryParser.ISymbol; import org.eclipse.cdt.debug.core.CDIDebugModel; import org.eclipse.cdt.debug.core.CDebugCorePlugin; import org.eclipse.cdt.debug.core.CDebugUtils; +import org.eclipse.cdt.debug.core.ICDebugConstants; import org.eclipse.cdt.debug.core.ICGlobalVariableManager; import org.eclipse.cdt.debug.core.cdi.CDIException; import org.eclipse.cdt.debug.core.cdi.ICDIAddressLocation; @@ -1564,7 +1565,8 @@ 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 ); + return fPreferences.getBoolean( PREF_INSTRUCTION_STEPPING_MODE ) || + CDebugCorePlugin.getDefault().getPluginPreferences().getBoolean( ICDebugConstants.PREF_INSTRUCTION_STEP_MODE_ON ); } /* (non-Javadoc) diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 0c4bfca0344..f088e3fa3d4 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,7 @@ +2005-06-12 Mikhail Khodjaiants + Temporary fix for bug 79872: Make instruction stepping default in disassembly view. + * DisassemblyView.java + 2005-06-10 Mikhail Khodjaiants Bug 84929: The "Expression to watch" field of the "Add Watchpoint" dialog is editable. * CDebugModelPresentation.java diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/disassembly/DisassemblyView.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/disassembly/DisassemblyView.java index d93ff7aa541..812ba7862c3 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/disassembly/DisassemblyView.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/views/disassembly/DisassemblyView.java @@ -13,6 +13,8 @@ package org.eclipse.cdt.debug.internal.ui.views.disassembly; import java.util.HashMap; import java.util.Iterator; import java.util.Map; +import org.eclipse.cdt.debug.core.CDebugCorePlugin; +import org.eclipse.cdt.debug.core.ICDebugConstants; import org.eclipse.cdt.debug.core.model.ICStackFrame; import org.eclipse.cdt.debug.core.model.IDisassembly; import org.eclipse.cdt.debug.internal.ui.ICDebugHelpContextIds; @@ -932,4 +934,24 @@ public class DisassemblyView extends AbstractDebugEventHandlerView computeInput( input, (ICStackFrame)context, this ); } } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.PageBookView#partActivated(org.eclipse.ui.IWorkbenchPart) + */ + public void partActivated( IWorkbenchPart part ) { + if ( this.equals( part ) ) { + CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_INSTRUCTION_STEP_MODE_ON, true ); + } + super.partActivated( part ); + } + + /* (non-Javadoc) + * @see org.eclipse.ui.part.PageBookView#partDeactivated(org.eclipse.ui.IWorkbenchPart) + */ + public void partDeactivated( IWorkbenchPart part ) { + if ( this.equals( part ) ) { + CDebugCorePlugin.getDefault().getPluginPreferences().setValue( ICDebugConstants.PREF_INSTRUCTION_STEP_MODE_ON, false ); + } + super.partDeactivated( part ); + } }