1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 17:56:01 +02:00

Check if breakpoint list is empty before deletion.

This commit is contained in:
Mikhail Khodjaiants 2002-09-20 21:47:39 +00:00
parent 5bd058f701
commit c58729d044

View file

@ -1076,6 +1076,8 @@ public class CDebugTarget extends CDebugElement
{ {
ICDIBreakpoint[] cdiBreakpoints = (ICDIBreakpoint[])getBreakpoints().values().toArray( new ICDIBreakpoint[0] ); ICDIBreakpoint[] cdiBreakpoints = (ICDIBreakpoint[])getBreakpoints().values().toArray( new ICDIBreakpoint[0] );
ICDIBreakpointManager bm = getCDISession().getBreakpointManager(); ICDIBreakpointManager bm = getCDISession().getBreakpointManager();
if ( cdiBreakpoints.length > 0 )
{
try try
{ {
bm.deleteBreakpoints( cdiBreakpoints ); bm.deleteBreakpoints( cdiBreakpoints );
@ -1095,6 +1097,7 @@ public class CDebugTarget extends CDebugElement
requestFailed( "Operation failed. Reason: ", e ); requestFailed( "Operation failed. Reason: ", e );
} }
} }
}
protected void removeBreakpoint( CBreakpoint breakpoint ) throws DebugException protected void removeBreakpoint( CBreakpoint breakpoint ) throws DebugException
{ {
@ -1126,6 +1129,8 @@ public class CDebugTarget extends CDebugElement
{ {
ICDIBreakpoint[] cdiBreakpoints = (ICDIBreakpoint[])getTemporaryBreakpoints().toArray( new ICDIBreakpoint[0] ); ICDIBreakpoint[] cdiBreakpoints = (ICDIBreakpoint[])getTemporaryBreakpoints().toArray( new ICDIBreakpoint[0] );
ICDIBreakpointManager bm = getCDISession().getBreakpointManager(); ICDIBreakpointManager bm = getCDISession().getBreakpointManager();
if ( cdiBreakpoints.length > 0 )
{
try try
{ {
bm.deleteBreakpoints( cdiBreakpoints ); bm.deleteBreakpoints( cdiBreakpoints );
@ -1136,6 +1141,7 @@ public class CDebugTarget extends CDebugElement
logError( e ); logError( e );
} }
} }
}
protected void changeBreakpointProperties( CBreakpoint breakpoint, IMarkerDelta delta ) throws DebugException protected void changeBreakpointProperties( CBreakpoint breakpoint, IMarkerDelta delta ) throws DebugException
{ {