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

Bug 374807 - [attach] Terminating the last attached process causes a

detach instead by killing GDB

Change-Id: I213f9b3a4abe294fc75b10c89fd64fd4202b941d
Reviewed-on: https://git.eclipse.org/r/14383
Reviewed-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
IP-Clean: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
Tested-by: Mikhail Khodjaiants <mikhailkhod@googlemail.com>
Reviewed-by: Marc Khouzam <marc.khouzam@ericsson.com>
IP-Clean: Marc Khouzam <marc.khouzam@ericsson.com>
Tested-by: Marc Khouzam <marc.khouzam@ericsson.com>
This commit is contained in:
Marc Khouzam 2013-07-08 14:43:29 -04:00
parent 3932f763bd
commit 6df967d0d4
2 changed files with 4 additions and 17 deletions

View file

@ -390,15 +390,9 @@ public class GDBProcesses extends MIProcesses implements IGDBProcesses {
@Override
public void terminate(IThreadDMContext thread, final RequestMonitor rm) {
// 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.
// Also, for a core session, there is no concept of killing the inferior,
// For a core session, there is no concept of killing the inferior,
// so lets kill GDB
if (fBackend.getSessionType() == SessionType.CORE ||
Platform.getPreferencesService().getBoolean(GdbPlugin.PLUGIN_ID,
IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB,
true, null)) {
if (fBackend.getSessionType() == SessionType.CORE) {
fGdb.terminate(rm);
} else if (thread instanceof IMIProcessDMContext) {
getDebuggingContext(

View file

@ -1243,16 +1243,9 @@ public class GDBProcesses_7_0 extends AbstractDsfService
@Override
public void terminate(IThreadDMContext thread, final RequestMonitor rm) {
// 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.
// Also, for a core session, there is no concept of killing the inferior,
// 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(GdbPlugin.PLUGIN_ID,
IGdbDebugPreferenceConstants.PREF_AUTO_TERMINATE_GDB,
true, null))) {
if (fBackend.getSessionType() == SessionType.CORE) {
fCommandControl.terminate(rm);
} else if (thread instanceof IMIProcessDMContext) {
getDebuggingContext(