mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-11 18:25:40 +02:00
Bug 310093 - Toggle instruction stepping mode issues
This commit is contained in:
parent
354ee07912
commit
b231775082
3 changed files with 26 additions and 11 deletions
|
@ -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 <code>null</code> if not available.
|
||||
* Associated inferior process, or <code>null</code> 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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -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 <code>"org.eclipse.cdt.debug.ui.DisassemblyView"</code>).
|
||||
* @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 <code>"org.eclipse.cdt.dsf.debug.ui.disassembly.view"</code>).
|
||||
* @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 <code>"org.eclipse.cdt.debug.ui.SignalsView"</code>).
|
||||
* @since 6.0
|
||||
|
|
Loading…
Add table
Reference in a new issue