diff options
author | Ken Ryall | 2007-05-04 22:24:46 +0000 |
---|---|---|
committer | Ken Ryall | 2007-05-04 22:24:46 +0000 |
commit | 87b26cc99e8284428c96652563888aeb27e17fe0 (patch) | |
tree | 3af9b43b92931ab98b4e09242003126ddc0fe2de /debug | |
parent | eb9921b9e1ecf6af67e1f850bbd61dd464572c69 (diff) | |
download | org.eclipse.cdt-87b26cc99e8284428c96652563888aeb27e17fe0.tar.gz org.eclipse.cdt-87b26cc99e8284428c96652563888aeb27e17fe0.tar.xz org.eclipse.cdt-87b26cc99e8284428c96652563888aeb27e17fe0.zip |
Bug 176081 - In multi-process debug, breakpoint is mistakenly uninstalled on process termination. Patch from Ling Wang.
Diffstat (limited to 'debug')
-rw-r--r-- | debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java index e29f6564dc7..283404cf1ff 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java @@ -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 { @@ -640,8 +648,9 @@ public class CBreakpointManager implements IBreakpointsListener, IBreakpointMana catch( CDIException e ) { } } - } ); - getBreakpointNotifier().breakpointsRemoved( getDebugTarget(), breakpoints ); + } ); + + getBreakpointNotifier().breakpointsRemoved( getDebugTarget(), (ICBreakpoint[])installedCBplist.toArray( new ICBreakpoint[installedCBplist.size()] ) ); } private ICBreakpoint[] register( IBreakpoint[] breakpoints ) { |