1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-09 01:05:38 +02:00

[300096] Fix to generate an MISuspended event with the proper thread id for MoveToLine and ResumeAtLine. With the latest changes in platform, this is required to get the IP properly painted.

This commit is contained in:
Marc Khouzam 2010-02-24 20:27:28 +00:00
parent fc4b41e811
commit f2eb63309f

View file

@ -14,6 +14,8 @@ package org.eclipse.cdt.dsf.mi.service.command;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import org.eclipse.cdt.dsf.datamodel.DMContexts;
import org.eclipse.cdt.dsf.datamodel.IDMContext;
import org.eclipse.cdt.dsf.debug.service.IRunControl; import org.eclipse.cdt.dsf.debug.service.IRunControl;
import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext; import org.eclipse.cdt.dsf.debug.service.IProcesses.IProcessDMContext;
import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMContext; import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMContext;
@ -291,16 +293,23 @@ public class MIRunControlEventProcessor
// MIStoppedEvent ourselves // MIStoppedEvent ourselves
if (cmd instanceof CLICommand<?>) { if (cmd instanceof CLICommand<?>) {
IRunControl runControl = fServicesTracker.getService(IRunControl.class); IRunControl runControl = fServicesTracker.getService(IRunControl.class);
IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class); if (runControl != null) {
if (runControl != null && procService != null) { IDMContext dmc = ((CLICommand<?>)cmd).getContext();
String groupId = MIProcesses.UNIQUE_GROUP_ID; IExecutionDMContext execDmc =
IProcessDMContext procDmc = procService.createProcessContext(fControlDmc, groupId); DMContexts.getAncestorOfType(dmc, IExecutionDMContext.class);
IContainerDMContext processContainerDmc = procService.createContainerContext(procDmc, groupId);
if (runControl.isSuspended(processContainerDmc) == false) { if (execDmc == null) {
MIEvent<?> event = MIStoppedEvent.parse(processContainerDmc, id, rr.getMIResults()); IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class);
if (procService != null) {
String groupId = MIProcesses.UNIQUE_GROUP_ID;
IProcessDMContext procDmc = procService.createProcessContext(fControlDmc, groupId);
execDmc = procService.createContainerContext(procDmc, groupId);
}
}
if (execDmc != null && runControl.isSuspended(execDmc) == false) {
MIEvent<?> event = MIStoppedEvent.parse(execDmc, id, rr.getMIResults());
fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties()); fCommandControl.getSession().dispatchEvent(event, fCommandControl.getProperties());
} }
} }
} }
} }