From 9ef94dcd6c749d6f51f79b396dc6833af8788d69 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Mon, 18 Dec 2006 10:48:27 +0000 Subject: [PATCH] Use the default value (STOP_AT_MAIN_DEFAULT) instead of "false". Minor cleanup. --- .../cdt/debug/internal/core/model/CDebugTarget.java | 7 ++++--- 1 file 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 ); }