Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Cortell2006-12-15 17:57:30 +0000
committerJohn Cortell2006-12-15 17:57:30 +0000
commita1b5b800321ba72fb62e35e86ba45ffe435a1529 (patch)
treed069be58d369909ef52517e778fa6cbbf7c08caf
parent7d4f1453c2c43cbb1162fc9e67ce084b414fd9c2 (diff)
downloadorg.eclipse.cdt-a1b5b800321ba72fb62e35e86ba45ffe435a1529.tar.gz
org.eclipse.cdt-a1b5b800321ba72fb62e35e86ba45ffe435a1529.tar.xz
org.eclipse.cdt-a1b5b800321ba72fb62e35e86ba45ffe435a1529.zip
Fixed bug 166774. Restart tries to set a breakpoint on main regardless of whether the stop on main checkbox is checked or not.
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java13
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 a32fe93f31..d8fd18eb88 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 {

Back to the top