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:
parent
98194b097c
commit
de27defb84
3 changed files with 15 additions and 0 deletions
|
@ -925,6 +925,11 @@ public class GDBProcesses_7_0 extends AbstractDsfService
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IMIRunControl runControl = getServicesTracker().getService(IMIRunControl.class);
|
||||||
|
if (runControl != null && !runControl.isTargetAcceptingCommands()) {
|
||||||
|
fBackend.interrupt();
|
||||||
|
}
|
||||||
|
|
||||||
fCommandControl.queueCommand(
|
fCommandControl.queueCommand(
|
||||||
fCommandFactory.createMITargetDetach(controlDmc, procDmc.getProcId()),
|
fCommandFactory.createMITargetDetach(controlDmc, procDmc.getProcId()),
|
||||||
new DataRequestMonitor<MIInfo>(getExecutor(), rm));
|
new DataRequestMonitor<MIInfo>(getExecutor(), rm));
|
||||||
|
|
|
@ -259,6 +259,11 @@ public class GDBProcesses_7_2 extends GDBProcesses_7_1 {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
IMIRunControl runControl = getServicesTracker().getService(IMIRunControl.class);
|
||||||
|
if (runControl != null && !runControl.isTargetAcceptingCommands()) {
|
||||||
|
fBackend.interrupt();
|
||||||
|
}
|
||||||
|
|
||||||
fCommandControl.queueCommand(
|
fCommandControl.queueCommand(
|
||||||
fCommandFactory.createMITargetDetach(controlDmc, containerDmc.getGroupId()),
|
fCommandFactory.createMITargetDetach(controlDmc, containerDmc.getGroupId()),
|
||||||
new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
|
new DataRequestMonitor<MIInfo>(getExecutor(), rm) {
|
||||||
|
|
|
@ -547,6 +547,11 @@ public class MIProcesses extends AbstractDsfService implements IMIProcesses, ICa
|
||||||
ICommandControlDMContext controlDmc = DMContexts.getAncestorOfType(dmc, ICommandControlDMContext.class);
|
ICommandControlDMContext controlDmc = DMContexts.getAncestorOfType(dmc, ICommandControlDMContext.class);
|
||||||
|
|
||||||
if (controlDmc != null) {
|
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
|
// This service version cannot use -target-detach because it didn't exist
|
||||||
// in versions of GDB up to and including GDB 6.8
|
// in versions of GDB up to and including GDB 6.8
|
||||||
fCommandControl.queueCommand(
|
fCommandControl.queueCommand(
|
||||||
|
|
Loading…
Add table
Reference in a new issue