mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +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:
parent
250d34926b
commit
02e236eed6
1 changed files with 10 additions and 1 deletions
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue