From bf9f5fbabd84bca349c0636064bef3ae7b0bbd9b Mon Sep 17 00:00:00 2001 From: Francois Chouinard Date: Thu, 24 Apr 2008 17:40:22 +0000 Subject: [PATCH] Fix for Bug228706 --- .../dd/dsf/debug/model/DsfMemoryBlockRetrieval.java | 11 ++++++----- .../src/org/eclipse/dd/mi/service/MIBreakpoints.java | 1 - .../eclipse/dd/mi/service/MIBreakpointsManager.java | 9 +++------ .../breakpoint/actions/MILogActionEnabler.java | 2 -- .../breakpoint/actions/MIResumeActionEnabler.java | 3 --- 5 files changed, 9 insertions(+), 17 deletions(-) diff --git a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/model/DsfMemoryBlockRetrieval.java b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/model/DsfMemoryBlockRetrieval.java index b0cdc7c0ac2..87d2a8aa9ce 100644 --- a/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/model/DsfMemoryBlockRetrieval.java +++ b/plugins/org.eclipse.dd.dsf.debug/src/org/eclipse/dd/dsf/debug/model/DsfMemoryBlockRetrieval.java @@ -102,9 +102,9 @@ public class DsfMemoryBlockRetrieval extends PlatformObject implements IMemoryBl // DSF stuff fModelId = modelId; - // FIXME: Currently memory contexts are differentiated by sessionID - // so there is no way to guarantee the memory blocks will be reinstated - // in the correct memory space. + // FIXME: (Bug228573) Currently memory contexts are differentiated by + // sessionID so there is no way to guarantee the memory blocks will be + // reinstated in the correct memory space. // Need a way to create deterministically the context ID from a unique // target, ideally from the launch configuration (or derived from it). // For the time being, just put some constant. This will work until we @@ -240,7 +240,7 @@ public class DsfMemoryBlockRetrieval extends PlatformObject implements IMemoryBl } // Process the block list specific to this memory context - // FIXME: We only process the first entry... + // FIXME: (Bug228573) We only process the first entry... if (root.getAttribute(ATTR_EXPRESSION_LIST_CONTEXT).equals(fContextString)) { List blocks = new ArrayList(); NodeList expressionList = root.getChildNodes(); @@ -262,7 +262,8 @@ public class DsfMemoryBlockRetrieval extends PlatformObject implements IMemoryBl } } - // FIXME: Each retrieval overwrites the previous one :-( + // FIXME: (Bug228573) Each retrieval overwrites the previous one :-( + // In theory, we should make this a Job since we are writing to the file system. // However, this would cause the same racing condition as Bug228308. Finally, we // don't care too much about the UI responsiveness since we are in the process of diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIBreakpoints.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIBreakpoints.java index 5b456c20950..0303374c2c6 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIBreakpoints.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIBreakpoints.java @@ -272,7 +272,6 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints @DsfServiceEventHandler public void eventDispatched(MIGDBExitEvent e) { - // TODO: Remove the installed breakpoints from the back-end } /////////////////////////////////////////////////////////////////////////// diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIBreakpointsManager.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIBreakpointsManager.java index a13de5f8fce..3e24bebb8f5 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIBreakpointsManager.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/MIBreakpointsManager.java @@ -1186,7 +1186,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo // Identify the platform breakpoint final ICBreakpoint breakpoint = findPlatformBreakpoint(number); - // FIXME: Temporary hack to have a context + // FIXME: (Bug228703) Temporary hack to have a context Object[] contexts = fTargetBPs.keySet().toArray(); final IBreakpointsTargetDMContext context = (IBreakpointsTargetDMContext) contexts[0]; @@ -1195,7 +1195,6 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo { setSystem(true); } @Override protected IStatus run(IProgressMonitor monitor) { - // FIXME: Rename MyAdaptableType to something more relevant fBreakpointActionManager.executeActions(breakpoint, new BreakpointActionAdapter(getExecutor(), getServicesTracker(), context)); return Status.OK_STATUS; }; @@ -1204,10 +1203,8 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo // Helper function to locate the platform breakpoint corresponding // to the target breakpoint/watchpoint that was just hit - // FIXME: Need a way to identify the correct context where the BP was hit - // because it impacts the action (expression evaluation and resume delay). - // This means that the Breakpoint/WatchpointHitEvent will need to - // provide some extra info... + + // FIXME: (Bug228703) Need a way to identify the correct context where the BP was hit private ICBreakpoint findPlatformBreakpoint(int targetBreakpointID) { Set targets = fTargetBPs.keySet(); for (IBreakpointsTargetDMContext target : targets) { diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/breakpoint/actions/MILogActionEnabler.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/breakpoint/actions/MILogActionEnabler.java index fc96c6a26c1..22c6bc3efc7 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/breakpoint/actions/MILogActionEnabler.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/breakpoint/actions/MILogActionEnabler.java @@ -35,8 +35,6 @@ public class MILogActionEnabler implements ILogActionEnabler { public MILogActionEnabler(DsfExecutor executor, DsfServicesTracker serviceTracker, IDMContext context) { fExecutor = executor; fServiceTracker = serviceTracker; - // FIXME: Although it looks optimistic, we know it works - // How can we guarantee that it always will? fContext = (IBreakpointsTargetDMContext) context; } diff --git a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/breakpoint/actions/MIResumeActionEnabler.java b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/breakpoint/actions/MIResumeActionEnabler.java index 1334f9e167f..4d84799c7b5 100644 --- a/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/breakpoint/actions/MIResumeActionEnabler.java +++ b/plugins/org.eclipse.dd.mi/src/org/eclipse/dd/mi/service/breakpoint/actions/MIResumeActionEnabler.java @@ -21,7 +21,6 @@ import org.eclipse.dd.dsf.service.DsfServicesTracker; public class MIResumeActionEnabler implements IResumeActionEnabler { - @SuppressWarnings("unused") private final DsfExecutor fExecutor; private final DsfServicesTracker fServiceTracker; private final IExecutionDMContext fContext; @@ -29,8 +28,6 @@ public class MIResumeActionEnabler implements IResumeActionEnabler { public MIResumeActionEnabler(DsfExecutor executor, DsfServicesTracker serviceTracker, IDMContext context) { fExecutor = executor; fServiceTracker = serviceTracker; - // FIXME: Although it looks optimistic, we know it works - // How can we guarantee that it always will? fContext = (IExecutionDMContext) context; }