Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/Thread.java19
1 files changed, 13 insertions, 6 deletions
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 bb7221997e6..d031b9c5ec9 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
@@ -131,8 +131,11 @@ public class Thread extends CObject implements ICDIThread {
//throw e;
//System.out.println(e);
} finally {
- target.setCurrentThread(currentThread, false);
- target.releaseTarget();
+ try {
+ target.setCurrentThread(currentThread, false);
+ } finally {
+ target.releaseTarget();
+ }
}
// assign the currentFrame if it was not done yet.
if (currentFrame == null) {
@@ -187,12 +190,13 @@ public class Thread extends CObject implements ICDIThread {
throw new MI2CDIException(e);
} finally {
try {
- target.setCurrentThread(currentThread, false);
+ target.setCurrentThread(currentThread, false);
} catch (MI2CDIException e) {
target.releaseTarget();
throw e;
+ } finally {
+ target.releaseTarget();
}
- target.releaseTarget();
}
}
return stackdepth;
@@ -239,8 +243,11 @@ public class Thread extends CObject implements ICDIThread {
//throw e;
//System.out.println(e);
} finally {
- target.setCurrentThread(currentThread, false);
- target.releaseTarget();
+ try {
+ target.setCurrentThread(currentThread, false);
+ } finally {
+ target.releaseTarget();
+ }
}
// take time to assign the currentFrame, if it is in the set
if (currentFrame == null) {

Back to the top