From 9e873ea49623188dabfb143e1f5a1a6b54ba1486 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Thu, 8 May 2003 17:22:16 +0000 Subject: [PATCH] In the "terminate" event handler of the session manager check the targets that belong to the current session. --- debug/org.eclipse.cdt.debug.core/ChangeLog | 5 +++++ .../org/eclipse/cdt/debug/internal/core/SessionManager.java | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index c4b18e142fe..a72d8173b9c 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,8 @@ +2003-05-08 Mikhail Khodjaiants + In the "terminate" event handler of the session manager check the targets that + belong to the current session. + * SessionManager.java + 2003-05-07 Mikhail Khodjaiants Set the error status if the debug target is suspended because of an error. * CDebugTarget.java diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java index 22ad9bb803b..233fc454828 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/SessionManager.java @@ -69,7 +69,9 @@ public class SessionManager implements IDebugEventSetListener boolean terminate = true; for ( int i = 0; i < targets.length; ++i ) { - if ( !targets[i].isTerminated() && !targets[i].isDisconnected() ) + if ( targets[i].getAdapter( ICDITarget.class ) != null && + session.equals( ((ICDITarget)targets[i].getAdapter( ICDITarget.class )).getSession() ) && + !targets[i].isTerminated() && !targets[i].isDisconnected() ) terminate = false; } if ( terminate )