Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-05-03 17:46:49 +0000
committerEugene Tarassov2013-05-03 17:46:49 +0000
commit1c13bc94cf1a835ba32a8f5fdad037aaef2f8110 (patch)
tree72945a40ccfa8091920d25030a3b6b944db1567a /plugins
parent02bfa2eaed8ff5c875f871288f0a34eaeedf0412 (diff)
downloadorg.eclipse.tcf-1c13bc94cf1a835ba32a8f5fdad037aaef2f8110.tar.gz
org.eclipse.tcf-1c13bc94cf1a835ba32a8f5fdad037aaef2f8110.tar.xz
org.eclipse.tcf-1c13bc94cf1a835ba32a8f5fdad037aaef2f8110.zip
TCF Debugger: fixed: in certain rare cases Step Return action does two steps instead of one
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOut.java26
1 files changed, 14 insertions, 12 deletions
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOut.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOut.java
index 3a539a4f6..5a99d7bf4 100644
--- a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOut.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOut.java
@@ -80,6 +80,20 @@ public abstract class TCFActionStepOut extends TCFAction implements IRunControl.
exit(error);
return;
}
+ int mode = step_back ? IRunControl.RM_REVERSE_STEP_OUT : IRunControl.RM_STEP_OUT;
+ if (ctx.canResume(mode)) {
+ if (step_cnt > 0) {
+ exit(null);
+ return;
+ }
+ ctx.resume(mode, 1, new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ step_cnt++;
+ return;
+ }
TCFDataCache<?> stack_trace = getStackTrace();
if (!stack_trace.validate(this)) return;
int frame_index = getStackFrameIndex();
@@ -90,18 +104,6 @@ public abstract class TCFActionStepOut extends TCFAction implements IRunControl.
else if (frame_index < 0) exit(null);
if (exited) return;
}
- int mode = step_back ? IRunControl.RM_REVERSE_STEP_OUT : IRunControl.RM_STEP_OUT;
- if (ctx.canResume(mode)) {
- int cnt = 1;
- if (ctx.canCount(mode)) cnt += frame_index;
- ctx.resume(mode, cnt, new IRunControl.DoneCommand() {
- public void doneCommand(IToken token, Exception error) {
- if (error != null) exit(error);
- }
- });
- step_cnt++;
- return;
- }
if (bps != null && ctx.canResume(step_back ? IRunControl.RM_REVERSE_RESUME : IRunControl.RM_RESUME)) {
if (bp == null) {
TCFDataCache<IStackTrace.StackTraceContext> frame = getStackFrame();

Back to the top