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

Bug 176081 - In multi-process debug, breakpoint is mistakenly uninstalled on process termination. Patch from Ling Wang.

This commit is contained in:
Ken Ryall 2007-05-04 22:24:46 +00:00
parent eb9921b9e1
commit 87b26cc99e

View file

@ -9,6 +9,7 @@
* QNX Software Systems - Initial API and implementation
* Matthias Spycher (matthias@coware.com) - patch for bug #112008
* Ken Ryall (Nokia) - bugs 170027, 105196
* Ling Wang (Nokia) - bug 176081
*******************************************************************************/
package org.eclipse.cdt.debug.internal.core;
@ -619,19 +620,26 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana
marker.delete();
} catch (CoreException e) {}
}
ArrayList list = new ArrayList();
ArrayList installedCDIBplist = new ArrayList();
ArrayList installedCBplist = new ArrayList();
ICBreakpoint[] breakpoints = new ICBreakpoint[0];
synchronized( getBreakpointMap() ) {
breakpoints = getBreakpointMap().getAllCBreakpoints();
for ( int i = 0; i < breakpoints.length; ++i ) {
if ( !getBreakpointMap().isInProgress( breakpoints[i] ) )
list.add( getBreakpointMap().getCDIBreakpoint( breakpoints[i] ) );
if ( !getBreakpointMap().isInProgress( breakpoints[i] ) ) {
installedCDIBplist.add( getBreakpointMap().getCDIBreakpoint( breakpoints[i] ) );
installedCBplist.add(breakpoints[i]);
}
}
if ( list.isEmpty() )
}
if ( installedCDIBplist.isEmpty() )
return;
final ICDIBreakpoint[] cdiBreakpoints = (ICDIBreakpoint[])list.toArray( new ICDIBreakpoint[list.size()] );
final ICDIBreakpoint[] cdiBreakpoints = (ICDIBreakpoint[])installedCDIBplist.toArray( new ICDIBreakpoint[installedCDIBplist.size()] );
final ICDITarget cdiTarget = getCDITarget();
DebugPlugin.getDefault().asyncExec( new Runnable() {
public void run() {
try {
@ -641,7 +649,8 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana
}
}
} );
getBreakpointNotifier().breakpointsRemoved( getDebugTarget(), breakpoints );
getBreakpointNotifier().breakpointsRemoved( getDebugTarget(), (ICBreakpoint[])installedCBplist.toArray( new ICBreakpoint[installedCBplist.size()] ) );
}
private ICBreakpoint[] register( IBreakpoint[] breakpoints ) {