mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-11 02:05:39 +02:00
Bug 339591: Cannot use 'kill' in a post-mortem session
This commit is contained in:
parent
19df0d4e31
commit
fb5cd6d11a
2 changed files with 9 additions and 3 deletions
|
@ -361,7 +361,10 @@ public class GDBProcesses extends MIProcesses implements IGDBProcesses {
|
||||||
// If we will terminate GDB as soon as the inferior terminates, then let's
|
// If we will terminate GDB as soon as the inferior terminates, then let's
|
||||||
// just terminate GDB itself. This is more robust since we actually monitor
|
// just terminate GDB itself. This is more robust since we actually monitor
|
||||||
// the success of terminating GDB.
|
// the success of terminating GDB.
|
||||||
if (Platform.getPreferencesService().getBoolean("org.eclipse.cdt.dsf.gdb.ui", //$NON-NLS-1$
|
// Also, for a core session, there is no concept of killing the inferior,
|
||||||
|
// so lets kill GDB
|
||||||
|
if (fBackend.getSessionType() == SessionType.CORE ||
|
||||||
|
Platform.getPreferencesService().getBoolean("org.eclipse.cdt.dsf.gdb.ui", //$NON-NLS-1$
|
||||||
IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB,
|
IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB,
|
||||||
true, null)) {
|
true, null)) {
|
||||||
fGdb.terminate(new RequestMonitor(ImmediateExecutor.getInstance(), null));
|
fGdb.terminate(new RequestMonitor(ImmediateExecutor.getInstance(), null));
|
||||||
|
|
|
@ -1175,10 +1175,13 @@ public class GDBProcesses_7_0 extends AbstractDsfService
|
||||||
// If we will terminate GDB as soon as the last inferior terminates, then let's
|
// If we will terminate GDB as soon as the last inferior terminates, then let's
|
||||||
// just terminate GDB itself if this is the last inferior.
|
// just terminate GDB itself if this is the last inferior.
|
||||||
// This is more robust since we actually monitor the success of terminating GDB.
|
// This is more robust since we actually monitor the success of terminating GDB.
|
||||||
if (fNumConnected == 1 &&
|
// Also, for a core session, there is no concept of killing the inferior,
|
||||||
|
// so lets kill GDB
|
||||||
|
if (fBackend.getSessionType() == SessionType.CORE ||
|
||||||
|
(fNumConnected == 1 &&
|
||||||
Platform.getPreferencesService().getBoolean("org.eclipse.cdt.dsf.gdb.ui", //$NON-NLS-1$
|
Platform.getPreferencesService().getBoolean("org.eclipse.cdt.dsf.gdb.ui", //$NON-NLS-1$
|
||||||
IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB,
|
IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB,
|
||||||
true, null)) {
|
true, null))) {
|
||||||
fCommandControl.terminate(new RequestMonitor(ImmediateExecutor.getInstance(), null));
|
fCommandControl.terminate(new RequestMonitor(ImmediateExecutor.getInstance(), null));
|
||||||
} else if (thread instanceof IMIProcessDMContext) {
|
} else if (thread instanceof IMIProcessDMContext) {
|
||||||
getDebuggingContext(
|
getDebuggingContext(
|
||||||
|
|
Loading…
Add table
Reference in a new issue