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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -150,7 +150,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
|
||||||
private ArrayList fThreads;
|
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;
|
private IProcess fDebuggeeProcess = null;
|
||||||
|
|
||||||
|
@ -793,7 +793,8 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
|
* @see org.eclipse.debug.core.model.IDebugElement#getLaunch()
|
||||||
*/
|
*/
|
||||||
public ILaunch getLaunch() {
|
@Override
|
||||||
|
public ILaunch getLaunch() {
|
||||||
return fLaunch;
|
return fLaunch;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -832,7 +833,8 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
|
* @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 ) )
|
if ( adapter.equals( ICDebugElement.class ) )
|
||||||
return this;
|
return this;
|
||||||
if ( adapter.equals( CDebugElement.class ) )
|
if ( adapter.equals( CDebugElement.class ) )
|
||||||
|
@ -1622,7 +1624,8 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see java.lang.Object#toString()
|
* @see java.lang.Object#toString()
|
||||||
*/
|
*/
|
||||||
public String toString() {
|
@Override
|
||||||
|
public String toString() {
|
||||||
String result = ""; //$NON-NLS-1$
|
String result = ""; //$NON-NLS-1$
|
||||||
try {
|
try {
|
||||||
result = getName();
|
result = getName();
|
||||||
|
@ -1697,8 +1700,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
|
||||||
* @see org.eclipse.cdt.debug.core.model.ISteppingModeTarget#isInstructionSteppingEnabled()
|
* @see org.eclipse.cdt.debug.core.model.ISteppingModeTarget#isInstructionSteppingEnabled()
|
||||||
*/
|
*/
|
||||||
public boolean 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)
|
/* (non-Javadoc)
|
||||||
|
@ -1710,10 +1712,15 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
|
||||||
|
|
||||||
private void initializePreferences() {
|
private void initializePreferences() {
|
||||||
fPreferences = new Preferences();
|
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() {
|
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;
|
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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -98,7 +98,7 @@ public class ToggleInstructionStepModeActionDelegate extends ActionDelegate impl
|
||||||
target.enableInstructionStepping( enabled );
|
target.enableInstructionStepping( enabled );
|
||||||
if ( enabled && target instanceof ICDebugTarget ) {
|
if ( enabled && target instanceof ICDebugTarget ) {
|
||||||
try {
|
try {
|
||||||
getView().getSite().getPage().showView( ICDebugUIConstants.ID_DISASSEMBLY_VIEW );
|
getView().getSite().getPage().showView( ICDebugUIConstants.ID_DSF_DISASSEMBLY_VIEW );
|
||||||
}
|
}
|
||||||
catch( PartInitException e ) {
|
catch( PartInitException e ) {
|
||||||
CDebugUIPlugin.log( e.getStatus() );
|
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
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* 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>).
|
* 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$
|
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>).
|
* Signals view identifier (value <code>"org.eclipse.cdt.debug.ui.SignalsView"</code>).
|
||||||
* @since 6.0
|
* @since 6.0
|
||||||
|
|
Loading…
Add table
Reference in a new issue