fix bug in breakpoint mediator andchange breakpoint attribute translator api to allow showing resolved breakpoints
--- a/cdt/cdt_6_0_x/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/BreakpointsMediator.java Mon Oct 12 15:55:57 2009 -0500
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/BreakpointsMediator.java Wed Oct 14 15:28:00 2009 -0500
@@ -29,6 +29,7 @@
import org.eclipse.cdt.dsf.concurrent.ThreadSafe;
import org.eclipse.cdt.dsf.datamodel.DMContexts;
import org.eclipse.cdt.dsf.datamodel.IDMContext;
+import org.eclipse.cdt.dsf.debug.service.IBreakpointAttributeTranslator.EBreakpointStatusChange;
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointDMContext;
import org.eclipse.cdt.dsf.debug.service.IBreakpoints.IBreakpointsTargetDMContext;
import org.eclipse.cdt.dsf.internal.DsfPlugin;
@@ -351,7 +352,7 @@
{ setSystem(true); }
@Override
protected IStatus run(IProgressMonitor monitor) {
- fAttributeTranslator.updateBreakpointStatus(bp);
+ fAttributeTranslator.updateBreakpointStatus(bp, EBreakpointStatusChange.EUninstalled);
return Status.OK_STATUS;
};
}.schedule();
@@ -396,14 +397,14 @@
// Update the breakpoint status when all back-end breakpoints have been installed
final CountingRequestMonitor installRM = new CountingRequestMonitor(getExecutor(), rm) {
@Override
- protected void handleCompleted() {
+ protected void handleSuccess() {
// Store the platform breakpoint
platformBPs.put(breakpoint, attrsList);
new Job("Breakpoint status update") { //$NON-NLS-1$
{ setSystem(true); }
@Override
protected IStatus run(IProgressMonitor monitor) {
- fAttributeTranslator.updateBreakpointStatus(breakpoint);
+ fAttributeTranslator.updateBreakpointStatus(breakpoint, EBreakpointStatusChange.EInstalled);
return Status.OK_STATUS;
};
}.schedule();
@@ -433,6 +434,7 @@
} else {
// TODO (bug 219841): need to add breakpoint error status tracking
// in addition to fBreakpointDMContexts.
+ installRM.setStatus(getStatus());
}
installRM.done();
}
@@ -479,7 +481,7 @@
{ setSystem(true); }
@Override
protected IStatus run(IProgressMonitor monitor) {
- fAttributeTranslator.updateBreakpointStatus(breakpoint);
+ fAttributeTranslator.updateBreakpointStatus(breakpoint, EBreakpointStatusChange.EUninstalled);
return Status.OK_STATUS;
};
}.schedule();
@@ -594,7 +596,7 @@
{ setSystem(true); }
@Override
protected IStatus run(IProgressMonitor monitor) {
- fAttributeTranslator.updateBreakpointStatus(breakpoint);
+ fAttributeTranslator.updateBreakpointStatus(breakpoint, EBreakpointStatusChange.EModified);
return Status.OK_STATUS;
};
}.schedule();
--- a/cdt/cdt_6_0_x/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IBreakpointAttributeTranslator.java Mon Oct 12 15:55:57 2009 -0500
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/debug/service/IBreakpointAttributeTranslator.java Wed Oct 14 15:28:00 2009 -0500
@@ -37,5 +37,9 @@
public boolean supportsBreakpoint(IBreakpoint bp);
- public void updateBreakpointStatus(IBreakpoint bp);
+ enum EBreakpointStatusChange {
+ EInstalled, EUninstalled, EModified
+ }
+
+ public void updateBreakpointStatus(IBreakpoint bp, EBreakpointStatusChange change);
}
\ No newline at end of file
--- a/cdt/cdt_6_0_x/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpointAttributeTranslator.java Mon Oct 12 15:55:57 2009 -0500
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/PDABreakpointAttributeTranslator.java Wed Oct 14 15:28:00 2009 -0500
@@ -128,7 +128,7 @@
return bp.getModelIdentifier().equals(PDAPlugin.ID_PDA_DEBUG_MODEL);
}
- public void updateBreakpointStatus(IBreakpoint bp) {
+ public void updateBreakpointStatus(IBreakpoint bp, EBreakpointStatusChange breakpointStatusChange) {
// PDA breakpoints do not support status reporting
}