1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-05 16:56:04 +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,24 +1076,27 @@ public class CDebugTarget extends CDebugElement
{
ICDIBreakpoint[] cdiBreakpoints = (ICDIBreakpoint[])getBreakpoints().values().toArray( new ICDIBreakpoint[0] );
ICDIBreakpointManager bm = getCDISession().getBreakpointManager();
try
if ( cdiBreakpoints.length > 0 )
{
bm.deleteBreakpoints( cdiBreakpoints );
Iterator it = getBreakpoints().keySet().iterator();
while( it.hasNext() )
try
{
((CBreakpoint)it.next()).decrementInstallCount();
bm.deleteBreakpoints( cdiBreakpoints );
Iterator it = getBreakpoints().keySet().iterator();
while( it.hasNext() )
{
((CBreakpoint)it.next()).decrementInstallCount();
}
getBreakpoints().clear();
}
catch( CoreException ce )
{
requestFailed( "Operation failed. Reason: ", ce );
}
catch( CDIException e )
{
requestFailed( "Operation failed. Reason: ", e );
}
getBreakpoints().clear();
}
catch( CoreException ce )
{
requestFailed( "Operation failed. Reason: ", ce );
}
catch( CDIException e )
{
requestFailed( "Operation failed. Reason: ", e );
}
}
protected void removeBreakpoint( CBreakpoint breakpoint ) throws DebugException
@ -1126,15 +1129,18 @@ public class CDebugTarget extends CDebugElement
{
ICDIBreakpoint[] cdiBreakpoints = (ICDIBreakpoint[])getTemporaryBreakpoints().toArray( new ICDIBreakpoint[0] );
ICDIBreakpointManager bm = getCDISession().getBreakpointManager();
try
if ( cdiBreakpoints.length > 0 )
{
bm.deleteBreakpoints( cdiBreakpoints );
getTemporaryBreakpoints().clear();
try
{
bm.deleteBreakpoints( cdiBreakpoints );
getTemporaryBreakpoints().clear();
}
catch( CDIException e )
{
logError( e );
}
}
catch( CDIException e )
{
logError( e );
}
}
protected void changeBreakpointProperties( CBreakpoint breakpoint, IMarkerDelta delta ) throws DebugException