Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/debug
diff options
context:
space:
mode:
authorJohn Cortell2007-03-22 20:44:15 +0000
committerJohn Cortell2007-03-22 20:44:15 +0000
commit02e236eed653572c6330d62ced24239676298420 (patch)
tree58f9e4c00d40f5ef39aab78dc009727e462c217b /debug
parent250d34926bbc401169c64cf9ea8106838ffbd062 (diff)
downloadorg.eclipse.cdt-02e236eed653572c6330d62ced24239676298420.tar.gz
org.eclipse.cdt-02e236eed653572c6330d62ced24239676298420.tar.xz
org.eclipse.cdt-02e236eed653572c6330d62ced24239676298420.zip
Support for a numeric address value being the stop on start expression was added last month, but the restart() case was not covered. This adds the missing support
Diffstat (limited to 'debug')
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java11
1 files changed, 10 insertions, 1 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 21870fd443a..17c85b9825b 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
@@ -906,7 +906,16 @@ public class CDebugTarget extends CDebugElement implements ICDebugTarget, ICDIEv
ILaunchConfiguration launchConfig = getLaunch().getLaunchConfiguration();
if ( launchConfig.getAttribute( ICDTLaunchConfigurationConstants.ATTR_DEBUGGER_STOP_AT_MAIN, ICDTLaunchConfigurationConstants.DEBUGGER_STOP_AT_MAIN_DEFAULT ) ) {
String 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$
+ ICDILocation location = null;
+ // See if the expression is a numeric address
+ try {
+ IAddress address = getAddressFactory().createAddress(mainSymbol);
+ location = getCDITarget().createAddressLocation( address.getValue() );
+ } catch (NumberFormatException nfexc) {
+ // OK, expression is not a simple, absolute numeric value; keep trucking and try to resolve as expression
+ location = getCDITarget().createFunctionLocation( "", mainSymbol ); //$NON-NLS-1$
+ }
+
setInternalTemporaryBreakpoint( location );
}
}

Back to the top