mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 17:05:26 +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:
parent
fc4b41e811
commit
f2eb63309f
1 changed files with 18 additions and 9 deletions
|
@ -14,6 +14,8 @@ package org.eclipse.cdt.dsf.mi.service.command;
|
|||
import java.util.LinkedList;
|
||||
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.IProcesses.IProcessDMContext;
|
||||
import org.eclipse.cdt.dsf.debug.service.IProcesses.IThreadDMContext;
|
||||
|
@ -291,16 +293,23 @@ public class MIRunControlEventProcessor
|
|||
// MIStoppedEvent ourselves
|
||||
if (cmd instanceof CLICommand<?>) {
|
||||
IRunControl runControl = fServicesTracker.getService(IRunControl.class);
|
||||
IMIProcesses procService = fServicesTracker.getService(IMIProcesses.class);
|
||||
if (runControl != null && procService != null) {
|
||||
String groupId = MIProcesses.UNIQUE_GROUP_ID;
|
||||
IProcessDMContext procDmc = procService.createProcessContext(fControlDmc, groupId);
|
||||
IContainerDMContext processContainerDmc = procService.createContainerContext(procDmc, groupId);
|
||||
|
||||
if (runControl.isSuspended(processContainerDmc) == false) {
|
||||
MIEvent<?> event = MIStoppedEvent.parse(processContainerDmc, id, rr.getMIResults());
|
||||
if (runControl != null) {
|
||||
IDMContext dmc = ((CLICommand<?>)cmd).getContext();
|
||||
IExecutionDMContext execDmc =
|
||||
DMContexts.getAncestorOfType(dmc, IExecutionDMContext.class);
|
||||
|
||||
if (execDmc == null) {
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue