1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Bug 339591: Cannot use 'kill' in a post-mortem session

This commit is contained in:
Marc Khouzam 2011-04-04 02:57:09 +00:00
parent 19df0d4e31
commit fb5cd6d11a
2 changed files with 9 additions and 3 deletions

View file

@ -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
// just terminate GDB itself. This is more robust since we actually monitor
// 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,
true, null)) {
fGdb.terminate(new RequestMonitor(ImmediateExecutor.getInstance(), null));

View file

@ -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
// just terminate GDB itself if this is the last inferior.
// 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$
IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB,
true, null)) {
true, null))) {
fCommandControl.terminate(new RequestMonitor(ImmediateExecutor.getInstance(), null));
} else if (thread instanceof IMIProcessDMContext) {
getDebuggingContext(