mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Fix for Bug228706
This commit is contained in:
parent
7fa8caa54f
commit
bf9f5fbabd
5 changed files with 9 additions and 17 deletions
|
@ -102,9 +102,9 @@ public class DsfMemoryBlockRetrieval extends PlatformObject implements IMemoryBl
|
||||||
// DSF stuff
|
// DSF stuff
|
||||||
fModelId = modelId;
|
fModelId = modelId;
|
||||||
|
|
||||||
// FIXME: Currently memory contexts are differentiated by sessionID
|
// FIXME: (Bug228573) Currently memory contexts are differentiated by
|
||||||
// so there is no way to guarantee the memory blocks will be reinstated
|
// sessionID so there is no way to guarantee the memory blocks will be
|
||||||
// in the correct memory space.
|
// reinstated in the correct memory space.
|
||||||
// Need a way to create deterministically the context ID from a unique
|
// Need a way to create deterministically the context ID from a unique
|
||||||
// target, ideally from the launch configuration (or derived from it).
|
// target, ideally from the launch configuration (or derived from it).
|
||||||
// For the time being, just put some constant. This will work until we
|
// 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
|
// 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)) {
|
if (root.getAttribute(ATTR_EXPRESSION_LIST_CONTEXT).equals(fContextString)) {
|
||||||
List<IMemoryBlock> blocks = new ArrayList<IMemoryBlock>();
|
List<IMemoryBlock> blocks = new ArrayList<IMemoryBlock>();
|
||||||
NodeList expressionList = root.getChildNodes();
|
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.
|
// 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
|
// 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
|
// don't care too much about the UI responsiveness since we are in the process of
|
||||||
|
|
|
@ -272,7 +272,6 @@ public class MIBreakpoints extends AbstractDsfService implements IBreakpoints
|
||||||
|
|
||||||
@DsfServiceEventHandler
|
@DsfServiceEventHandler
|
||||||
public void eventDispatched(MIGDBExitEvent e) {
|
public void eventDispatched(MIGDBExitEvent e) {
|
||||||
// TODO: Remove the installed breakpoints from the back-end
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -1186,7 +1186,7 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
// Identify the platform breakpoint
|
// Identify the platform breakpoint
|
||||||
final ICBreakpoint breakpoint = findPlatformBreakpoint(number);
|
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();
|
Object[] contexts = fTargetBPs.keySet().toArray();
|
||||||
final IBreakpointsTargetDMContext context = (IBreakpointsTargetDMContext) contexts[0];
|
final IBreakpointsTargetDMContext context = (IBreakpointsTargetDMContext) contexts[0];
|
||||||
|
|
||||||
|
@ -1195,7 +1195,6 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
{ setSystem(true); }
|
{ setSystem(true); }
|
||||||
@Override
|
@Override
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
// FIXME: Rename MyAdaptableType to something more relevant
|
|
||||||
fBreakpointActionManager.executeActions(breakpoint, new BreakpointActionAdapter(getExecutor(), getServicesTracker(), context));
|
fBreakpointActionManager.executeActions(breakpoint, new BreakpointActionAdapter(getExecutor(), getServicesTracker(), context));
|
||||||
return Status.OK_STATUS;
|
return Status.OK_STATUS;
|
||||||
};
|
};
|
||||||
|
@ -1204,10 +1203,8 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
|
||||||
|
|
||||||
// Helper function to locate the platform breakpoint corresponding
|
// Helper function to locate the platform breakpoint corresponding
|
||||||
// to the target breakpoint/watchpoint that was just hit
|
// 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).
|
// FIXME: (Bug228703) Need a way to identify the correct context where the BP was hit
|
||||||
// This means that the Breakpoint/WatchpointHitEvent will need to
|
|
||||||
// provide some extra info...
|
|
||||||
private ICBreakpoint findPlatformBreakpoint(int targetBreakpointID) {
|
private ICBreakpoint findPlatformBreakpoint(int targetBreakpointID) {
|
||||||
Set<IBreakpointsTargetDMContext> targets = fTargetBPs.keySet();
|
Set<IBreakpointsTargetDMContext> targets = fTargetBPs.keySet();
|
||||||
for (IBreakpointsTargetDMContext target : targets) {
|
for (IBreakpointsTargetDMContext target : targets) {
|
||||||
|
|
|
@ -35,8 +35,6 @@ public class MILogActionEnabler implements ILogActionEnabler {
|
||||||
public MILogActionEnabler(DsfExecutor executor, DsfServicesTracker serviceTracker, IDMContext context) {
|
public MILogActionEnabler(DsfExecutor executor, DsfServicesTracker serviceTracker, IDMContext context) {
|
||||||
fExecutor = executor;
|
fExecutor = executor;
|
||||||
fServiceTracker = serviceTracker;
|
fServiceTracker = serviceTracker;
|
||||||
// FIXME: Although it looks optimistic, we know it works
|
|
||||||
// How can we guarantee that it always will?
|
|
||||||
fContext = (IBreakpointsTargetDMContext) context;
|
fContext = (IBreakpointsTargetDMContext) context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,6 @@ import org.eclipse.dd.dsf.service.DsfServicesTracker;
|
||||||
|
|
||||||
public class MIResumeActionEnabler implements IResumeActionEnabler {
|
public class MIResumeActionEnabler implements IResumeActionEnabler {
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private final DsfExecutor fExecutor;
|
private final DsfExecutor fExecutor;
|
||||||
private final DsfServicesTracker fServiceTracker;
|
private final DsfServicesTracker fServiceTracker;
|
||||||
private final IExecutionDMContext fContext;
|
private final IExecutionDMContext fContext;
|
||||||
|
@ -29,8 +28,6 @@ public class MIResumeActionEnabler implements IResumeActionEnabler {
|
||||||
public MIResumeActionEnabler(DsfExecutor executor, DsfServicesTracker serviceTracker, IDMContext context) {
|
public MIResumeActionEnabler(DsfExecutor executor, DsfServicesTracker serviceTracker, IDMContext context) {
|
||||||
fExecutor = executor;
|
fExecutor = executor;
|
||||||
fServiceTracker = serviceTracker;
|
fServiceTracker = serviceTracker;
|
||||||
// FIXME: Although it looks optimistic, we know it works
|
|
||||||
// How can we guarantee that it always will?
|
|
||||||
fContext = (IExecutionDMContext) context;
|
fContext = (IExecutionDMContext) context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue