mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-09-10 12:03:16 +02:00
Additional fix for bug 58711: Breakpoint race condition.
This commit is contained in:
parent
d33fe003f1
commit
1802824b5f
2 changed files with 28 additions and 12 deletions
|
@ -1,3 +1,7 @@
|
|||
2004-04-15 Mikhail Khodjaiants
|
||||
Additional fix for bug 58711: Breakpoint race condition.
|
||||
* CBreakpointManager.java
|
||||
|
||||
2004-04-21 Mikhail Khodjaiants
|
||||
Disassembly should provide an adapter for IExecFialeInfo.
|
||||
* Disassembly.java
|
||||
|
|
|
@ -449,40 +449,52 @@ public class CBreakpointManager implements ICDIEventListener, IAdaptable {
|
|||
}
|
||||
}
|
||||
|
||||
private synchronized ICDIBreakpoint setFunctionBreakpoint( ICFunctionBreakpoint breakpoint ) throws CDIException, CoreException {
|
||||
private ICDIBreakpoint setFunctionBreakpoint( ICFunctionBreakpoint breakpoint ) throws CDIException, CoreException {
|
||||
ICDIBreakpointManager bm = getCDIBreakpointManager();
|
||||
String function = breakpoint.getFunction();
|
||||
String fileName = (function != null && function.indexOf( "::" ) == -1) ? breakpoint.getFileName() : null; //$NON-NLS-1$
|
||||
ICDILocation location = bm.createLocation( fileName, function, -1 );
|
||||
ICDIBreakpoint cdiBreakpoint = bm.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, null, null, true );
|
||||
getBreakpointMap().put( breakpoint, cdiBreakpoint );
|
||||
ICDIBreakpoint cdiBreakpoint = null;
|
||||
synchronized ( getBreakpointMap() ) {
|
||||
cdiBreakpoint = bm.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, null, null, true );
|
||||
getBreakpointMap().put( breakpoint, cdiBreakpoint );
|
||||
}
|
||||
return cdiBreakpoint;
|
||||
}
|
||||
|
||||
private synchronized ICDIBreakpoint setAddressBreakpoint( ICAddressBreakpoint breakpoint ) throws CDIException, CoreException, NumberFormatException {
|
||||
private ICDIBreakpoint setAddressBreakpoint( ICAddressBreakpoint breakpoint ) throws CDIException, CoreException, NumberFormatException {
|
||||
ICDIBreakpointManager bm = getCDIBreakpointManager();
|
||||
ICDILocation location = bm.createLocation( Long.parseLong( breakpoint.getAddress() ) );
|
||||
ICDIBreakpoint cdiBreakpoint = bm.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, null, null, true );
|
||||
getBreakpointMap().put( breakpoint, cdiBreakpoint );
|
||||
ICDIBreakpoint cdiBreakpoint = null;
|
||||
synchronized ( getBreakpointMap() ) {
|
||||
cdiBreakpoint = bm.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, null, null, true );
|
||||
getBreakpointMap().put( breakpoint, cdiBreakpoint );
|
||||
}
|
||||
return cdiBreakpoint;
|
||||
}
|
||||
|
||||
private synchronized ICDIBreakpoint setLineBreakpoint( ICLineBreakpoint breakpoint ) throws CDIException, CoreException {
|
||||
private ICDIBreakpoint setLineBreakpoint( ICLineBreakpoint breakpoint ) throws CDIException, CoreException {
|
||||
ICDIBreakpointManager bm = getCDIBreakpointManager();
|
||||
ICDILocation location = bm.createLocation( breakpoint.getMarker().getResource().getLocation().lastSegment(), null, breakpoint.getLineNumber() );
|
||||
ICDIBreakpoint cdiBreakpoint = bm.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, null, null, true );
|
||||
getBreakpointMap().put( breakpoint, cdiBreakpoint );
|
||||
ICDIBreakpoint cdiBreakpoint = null;
|
||||
synchronized ( getBreakpointMap() ) {
|
||||
cdiBreakpoint = bm.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, null, null, true );
|
||||
getBreakpointMap().put( breakpoint, cdiBreakpoint );
|
||||
}
|
||||
return cdiBreakpoint;
|
||||
}
|
||||
|
||||
private synchronized ICDIBreakpoint setWatchpoint( ICWatchpoint watchpoint ) throws CDIException, CoreException {
|
||||
private ICDIBreakpoint setWatchpoint( ICWatchpoint watchpoint ) throws CDIException, CoreException {
|
||||
ICDIBreakpointManager bm = getCDIBreakpointManager();
|
||||
int accessType = 0;
|
||||
accessType |= (watchpoint.isWriteType()) ? ICDIWatchpoint.WRITE : 0;
|
||||
accessType |= (watchpoint.isReadType()) ? ICDIWatchpoint.READ : 0;
|
||||
String expression = watchpoint.getExpression();
|
||||
ICDIWatchpoint cdiWatchpoint = bm.setWatchpoint( ICDIBreakpoint.REGULAR, accessType, expression, null );
|
||||
getBreakpointMap().put( watchpoint, cdiWatchpoint );
|
||||
ICDIWatchpoint cdiWatchpoint = null;
|
||||
synchronized ( getBreakpointMap() ) {
|
||||
cdiWatchpoint = bm.setWatchpoint( ICDIBreakpoint.REGULAR, accessType, expression, null );
|
||||
getBreakpointMap().put( watchpoint, cdiWatchpoint );
|
||||
}
|
||||
return cdiWatchpoint;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue