diff options
author | John Cortell | 2006-12-15 18:00:09 +0000 |
---|---|---|
committer | John Cortell | 2006-12-15 18:00:09 +0000 |
commit | 66948345f02c12d4e7920c3ced4e223e86d4d30d (patch) | |
tree | be2d5fa0443188b6abefcab0a09c23319a2afaf5 /debug | |
parent | ab07486e81f257bd206c7d67743140ef2ab398a6 (diff) | |
download | org.eclipse.cdt-66948345f02c12d4e7920c3ced4e223e86d4d30d.tar.gz org.eclipse.cdt-66948345f02c12d4e7920c3ced4e223e86d4d30d.tar.xz org.eclipse.cdt-66948345f02c12d4e7920c3ced4e223e86d4d30d.zip |
Fixed bug 166774. Restart tries to set a breakpoint on main regardless of whether the stop on main checkbox is checked or not.
Diffstat (limited to 'debug')
-rw-r--r-- | debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java | 13 |
1 files changed, 9 insertions, 4 deletions
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 a32fe93f31f..d8fd18eb882 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 @@ -107,6 +107,7 @@ import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.IExpressionListener; import org.eclipse.debug.core.IExpressionManager; import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchListener; import org.eclipse.debug.core.model.IBreakpoint; import org.eclipse.debug.core.model.IDebugTarget; @@ -899,15 +900,19 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv if ( !canRestart() ) { return; } - String mainSymbol = new String( ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT ); try { - mainSymbol = getLaunch().getLaunchConfiguration().getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT ); + ILaunchConfiguration launchConfig = getLaunch().getLaunchConfiguration(); + if (launchConfig.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false)) { + String mainSymbol = new String( ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT ); + mainSymbol = getLaunch().getLaunchConfiguration().getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN_SYMBOL, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_SYMBOL_DEFAULT ); + ICDILocation location = getCDITarget().createFunctionLocation( "", mainSymbol ); //$NON-NLS-1$ + setInternalTemporaryBreakpoint( location ); + } } catch( CoreException e ) { requestFailed( e.getMessage(), e ); } - ICDILocation location = getCDITarget().createFunctionLocation( "", mainSymbol ); //$NON-NLS-1$ - setInternalTemporaryBreakpoint( location ); + final CDebugElementState newState = CDebugElementState.RESTARTING; changeState( newState ); try { |