Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2006-12-18 05:52:47 -0500
committerMikhail Khodjaiants2006-12-18 05:52:47 -0500
commit2b5061437c42fadb28bd82b9d527ac4922d66842 (patch)
treec08c3dd5a167d221ac34ba407a98be5b1262ed52
parenta1b5b800321ba72fb62e35e86ba45ffe435a1529 (diff)
downloadorg.eclipse.cdt-2b5061437c42fadb28bd82b9d527ac4922d66842.tar.gz
org.eclipse.cdt-2b5061437c42fadb28bd82b9d527ac4922d66842.tar.xz
org.eclipse.cdt-2b5061437c42fadb28bd82b9d527ac4922d66842.zip
Use the default value (STOP_AT_MAIN_DEFAULT) instead of "false".
Minor cleanup.
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java7
1 files changed, 4 insertions, 3 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 d8fd18eb882..e51ff06233a 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
@@ -17,6 +17,7 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
+
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.IAddress;
import org.eclipse.cdt.core.IAddressFactory;
@@ -829,7 +830,7 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
if ( source == null && event instanceof ICDIDestroyedEvent ) {
handleTerminatedEvent( (ICDIDestroyedEvent)event );
}
- else if ( source.getTarget().equals( getCDITarget() ) ) {
+ else if ( source != null && source.getTarget().equals( getCDITarget() ) ) {
if ( event instanceof ICDICreatedEvent ) {
if ( source instanceof ICDIThread ) {
handleThreadCreatedEvent( (ICDICreatedEvent)event );
@@ -902,9 +903,9 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
}
try {
ILaunchConfiguration launchConfig = getLaunch().getLaunchConfiguration();
- if (launchConfig.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, false)) {
+ if ( launchConfig.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_DEFAULT ) ) {
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 );
+ mainSymbol = launchConfig.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 );
}

Back to the top