From 05767b54ba0865b29ecbfc9a44d33c65dd1e45ae Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Thu, 17 May 2007 16:54:35 +0000 Subject: [PATCH] Handle exception that was being thrown in the finally clause the resulted in unbalanced locks in the target. --- .../cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java index a8488ad6055..03359f585a3 100644 --- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java +++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java @@ -186,7 +186,12 @@ public class Thread extends CObject implements ICDIThread { } catch (MIException e) { throw new MI2CDIException(e); } finally { + try { target.setCurrentThread(currentThread, false); + } catch (MI2CDIException e) { + target.releaseTarget(); + throw e; + } target.releaseTarget(); } }