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,14 +293,21 @@ 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);
if (runControl != null) {
IDMContext dmc = ((CLICommand<?>)cmd).getContext();
IExecutionDMContext execDmc =
DMContexts.getAncestorOfType(dmc, IExecutionDMContext.class);
if (execDmc == null) {
IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class); IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class);
if (runControl != null && procService != null) { if (procService != null) {
String groupId = MIProcesses.UNIQUE_GROUP_ID; String groupId = MIProcesses.UNIQUE_GROUP_ID;
IProcessDMContext procDmc = procService.createProcessContext(fControlDmc, groupId); IProcessDMContext procDmc = procService.createProcessContext(fControlDmc, groupId);
IContainerDMContext processContainerDmc = procService.createContainerContext(procDmc, groupId); execDmc = procService.createContainerContext(procDmc, groupId);
}
if (runControl.isSuspended(processContainerDmc) == false) { }
MIEvent<?> event = MIStoppedEvent.parse(processContainerDmc, id, rr.getMIResults()); 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());
} }
} }