1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 340601 - Detaching from a process needs to stop a running program

This commit is contained in:
Marc Khouzam 2011-04-04 01:47:58 +00:00
parent 98194b097c
commit de27defb84
3 changed files with 15 additions and 0 deletions

View file

@ -925,6 +925,11 @@ public class GDBProcesses_7_0 extends AbstractDsfService
return;
}
IMIRunControl runControl = getServicesTracker().getService(IMIRunControl.class);
if (runControl != null && !runControl.isTargetAcceptingCommands()) {
fBackend.interrupt();
}
fCommandControl.queueCommand(
fCommandFactory.createMITargetDetach(controlDmc, procDmc.getProcId()),
new DataRequestMonitor<MIInfo>(getExecutor(), rm));

View file

@ -259,6 +259,11 @@ public class GDBProcesses_7_2 extends GDBProcesses_7_1 {
return;
}
IMIRunControl runControl = getServicesTracker().getService(IMIRunControl.class);
if (runControl != null && !runControl.isTargetAcceptingCommands()) {
fBackend.interrupt();
}
fCommandControl.queueCommand(
fCommandFactory.createMITargetDetach(controlDmc, containerDmc.getGroupId()),
new DataRequestMonitor<MIInfo>(getExecutor(), rm) {

View file

@ -547,6 +547,11 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
ICommandControlDMContext controlDmc = DMContexts.getAncestorOfType(dmc, ICommandControlDMContext.class);
if (controlDmc != null) {
IMIRunControl runControl = getServicesTracker().getService(IMIRunControl.class);
if (runControl != null && !runControl.isTargetAcceptingCommands()) {
fGdbBackend.interrupt();
}
// This service version cannot use -target-detach because it didn't exist
// in versions of GDB up to and including GDB 6.8
fCommandControl.queueCommand(