1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 09:16:02 +02:00

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

This commit is contained in:
John Cortell 2007-03-22 20:44:15 +00:00
parent 250d34926b
commit 02e236eed6

View file

@ -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 );
}
}