mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 12:55:40 +02:00
Fix bug 155316.
This commit is contained in:
parent
7549d7cec2
commit
a2457049ee
2 changed files with 29 additions and 9 deletions
|
@ -45,4 +45,15 @@ public interface ICDITargetConfiguration2 extends ICDITargetConfiguration {
|
||||||
*/
|
*/
|
||||||
boolean supportsRuntimeTypeIdentification();
|
boolean supportsRuntimeTypeIdentification();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns whether this target supports having address breakpoints
|
||||||
|
* enabled when a debug session starts.
|
||||||
|
* If so this means address breaks will not be disabled on startup.
|
||||||
|
*
|
||||||
|
* @return whether this target supports having address breakpoints
|
||||||
|
* enabled when a debug session starts.
|
||||||
|
* If so this means address breaks will not be disabled on startup.
|
||||||
|
*/
|
||||||
|
boolean supportsAddressBreaksOnStartup();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,6 +43,8 @@ import org.eclipse.cdt.debug.core.cdi.model.ICDILineBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDILocationBreakpoint;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDILocationBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDITarget;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration;
|
||||||
|
import org.eclipse.cdt.debug.core.cdi.model.ICDITargetConfiguration2;
|
||||||
import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
|
import org.eclipse.cdt.debug.core.cdi.model.ICDIWatchpoint;
|
||||||
import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
|
import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
|
import org.eclipse.cdt.debug.core.model.ICBreakpoint;
|
||||||
|
@ -850,18 +852,25 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana
|
||||||
public void setInitialBreakpoints() {
|
public void setInitialBreakpoints() {
|
||||||
IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
|
IBreakpointManager manager = DebugPlugin.getDefault().getBreakpointManager();
|
||||||
IBreakpoint[] bps = manager.getBreakpoints( CDIDebugModel.getPluginIdentifier() );
|
IBreakpoint[] bps = manager.getBreakpoints( CDIDebugModel.getPluginIdentifier() );
|
||||||
for( int i = 0; i < bps.length; i++ ) {
|
|
||||||
if ( bps[i] instanceof ICBreakpoint && isTargetBreakpoint( (ICBreakpoint)bps[i] ) && !getBreakpointMap().isRegistered( (ICBreakpoint)bps[i] ) ) {
|
ICDITargetConfiguration config = getDebugTarget().getCDITarget().getConfiguration();
|
||||||
if ( bps[i] instanceof ICAddressBreakpoint ) {
|
|
||||||
// disable address breakpoints to prevent the debugger to insert them prematurely
|
if (!(config instanceof ICDITargetConfiguration2) || !((ICDITargetConfiguration2)config).supportsAddressBreaksOnStartup())
|
||||||
try {
|
{ // Disable address breaks of the target does not support setting them on startup
|
||||||
bps[i].setEnabled( false );
|
for( int i = 0; i < bps.length; i++ ) {
|
||||||
}
|
if ( bps[i] instanceof ICBreakpoint && isTargetBreakpoint( (ICBreakpoint)bps[i] ) && !getBreakpointMap().isRegistered( (ICBreakpoint)bps[i] ) ) {
|
||||||
catch( CoreException e ) {
|
if ( bps[i] instanceof ICAddressBreakpoint ) {
|
||||||
|
// disable address breakpoints to prevent the debugger to insert them prematurely
|
||||||
|
try {
|
||||||
|
bps[i].setEnabled( false );
|
||||||
|
}
|
||||||
|
catch( CoreException e ) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ICBreakpoint[] breakpoints = register( bps );
|
ICBreakpoint[] breakpoints = register( bps );
|
||||||
setBreakpointsOnTarget0( breakpoints );
|
setBreakpointsOnTarget0( breakpoints );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue