Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2015-05-30 17:53:04 -0400
committerEugene Tarassov2015-05-30 17:53:04 -0400
commit65b8431900dc5777b752455b9b2181379f7865e4 (patch)
tree71bdc64e0a9e364a3b60139b791f0535ed5c54c6 /plugins
parentb99a5960cb0aea2b84bd38a40a70e739212d8f3e (diff)
downloadorg.eclipse.tcf-65b8431900dc5777b752455b9b2181379f7865e4.tar.gz
org.eclipse.tcf-65b8431900dc5777b752455b9b2181379f7865e4.tar.xz
org.eclipse.tcf-65b8431900dc5777b752455b9b2181379f7865e4.zip
TCF Debugger: stepping commands implementation is moved to UI plugin to allow direct access to debug model caches
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ActionStepInto.java288
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ActionStepOut.java245
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ActionStepOver.java405
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackIntoCommand.java61
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackOverCommand.java76
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackReturnCommand.java67
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DropToFrameCommand.java92
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepIntoCommand.java59
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepOverCommand.java76
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepReturnCommand.java67
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ToggleFilterVariantsHandler.java3
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepInto.java1
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOut.java1
-rw-r--r--plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOver.java1
14 files changed, 983 insertions, 459 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ActionStepInto.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ActionStepInto.java
new file mode 100644
index 000000000..1e74d57bf
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ActionStepInto.java
@@ -0,0 +1,288 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2011 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.ui.commands;
+
+import java.math.BigInteger;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
+import org.eclipse.tcf.internal.debug.actions.TCFAction;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFChildrenStackTrace;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.ILineNumbers;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.util.TCFDataCache;
+
+public class ActionStepInto extends TCFAction implements IRunControl.RunControlListener {
+
+ protected final TCFNodeExecContext node;
+ private final IDebugCommandRequest monitor;
+ private final Runnable done;
+ private boolean step_line;
+ private boolean step_back;
+ private final IRunControl rc;
+
+ private TCFSourceRef source_ref;
+ private BigInteger pc0;
+ private BigInteger pc1;
+ private int step_cnt;
+ private boolean second_step_back;
+ private boolean final_step;
+
+ protected boolean exited;
+
+ public ActionStepInto(TCFNodeExecContext node, boolean step_line, boolean back_step,
+ IDebugCommandRequest monitor, Runnable done) {
+ super(node.getModel().getLaunch(), node.getID());
+ this.node = node;
+ this.step_line = step_line;
+ this.step_back = back_step;
+ this.monitor = monitor;
+ this.done = done;
+ rc = launch.getService(IRunControl.class);
+ }
+
+ public void run() {
+ if (exited) return;
+ try {
+ runAction();
+ }
+ catch (Throwable x) {
+ exit(x);
+ }
+ }
+
+ private void setSourceRef(TCFSourceRef ref) {
+ ILineNumbers.CodeArea area = ref.area;
+ if (area != null) {
+ pc0 = JSON.toBigInteger(area.start_address);
+ pc1 = JSON.toBigInteger(area.end_address);
+ }
+ else {
+ pc0 = null;
+ pc1 = null;
+ }
+ source_ref = ref;
+ }
+
+ private void runAction() {
+ if (aborted) {
+ exit(null);
+ return;
+ }
+ TCFDataCache<TCFContextState> state_cache = node.getState();
+ if (state_cache == null) {
+ exit(new Exception("Invalid context ID"));
+ return;
+ }
+ if (!state_cache.validate(this)) return;
+ if (state_cache.getData() == null || !state_cache.getData().is_suspended) {
+ Throwable error = state_cache.getError();
+ if (error == null) error = new Exception("Context is not suspended");
+ exit(error);
+ return;
+ }
+ if (step_cnt == 0) {
+ rc.addListener(this);
+ }
+ else {
+ String reason = state_cache.getData().suspend_reason;
+ if (!IRunControl.REASON_STEP.equals(reason)) {
+ exit(null, reason);
+ return;
+ }
+ }
+ TCFDataCache<IRunControl.RunControlContext> ctx_cache = node.getRunContext();
+ if (!ctx_cache.validate(this)) return;
+ IRunControl.RunControlContext ctx_data = ctx_cache.getData();
+ if (ctx_data == null) {
+ exit(ctx_cache.getError());
+ return;
+ }
+ int mode = 0;
+ if (!step_line) mode = step_back ? IRunControl.RM_REVERSE_STEP_INTO : IRunControl.RM_STEP_INTO;
+ else mode = step_back ? IRunControl.RM_REVERSE_STEP_INTO_LINE : IRunControl.RM_STEP_INTO_LINE;
+ if (ctx_data.canResume(mode)) {
+ if (step_cnt > 0) {
+ exit(null);
+ return;
+ }
+ ctx_data.resume(mode, 1, new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ step_cnt++;
+ return;
+ }
+ if (!step_line) {
+ exit(new Exception("Step into is not supported"));
+ return;
+ }
+ TCFChildrenStackTrace stack_trace = node.getStackTrace();
+ if (!stack_trace.validate(this)) return;
+ if (stack_trace.getData() == null) {
+ exit(stack_trace.getError());
+ return;
+ }
+ TCFNodeStackFrame frame = stack_trace.getTopFrame();
+ if (source_ref == null) {
+ TCFDataCache<TCFSourceRef> line_info = frame.getLineInfo();
+ if (!line_info.validate(this)) return;
+ TCFSourceRef ref = line_info.getData();
+ if (ref == null) {
+ step_line = false;
+ Protocol.invokeLater(this);
+ return;
+ }
+ if (ref.error != null) {
+ exit(ref.error);
+ return;
+ }
+ setSourceRef(ref);
+ }
+ BigInteger pc = new BigInteger(state_cache.getData().suspend_pc);
+ if (step_cnt > 0) {
+ if (pc == null || pc0 == null || pc1 == null) {
+ exit(null);
+ return;
+ }
+ if (pc.compareTo(pc0) < 0 || pc.compareTo(pc1) >= 0) {
+ TCFDataCache<TCFSourceRef> line_info = frame.getLineInfo();
+ if (!line_info.validate(this)) return;
+ TCFSourceRef ref = line_info.getData();
+ if (ref == null || ref.area == null) {
+ exit(null);
+ }
+ else if (isSameLine(source_ref.area, ref.area)) {
+ setSourceRef(ref);
+ }
+ else if (step_back && !second_step_back) {
+ // After step back we stop at last instruction of previous line.
+ // Do second step back into line to skip that line.
+ second_step_back = true;
+ setSourceRef(ref);
+ }
+ else if (step_back && !final_step) {
+ // After second step back we have stepped one instruction more then needed.
+ // Do final step forward to correct that.
+ final_step = true;
+ step_back = false;
+ setSourceRef(ref);
+ }
+ else {
+ exit(null);
+ return;
+ }
+ }
+ }
+ step_cnt++;
+ mode = step_back ? IRunControl.RM_REVERSE_STEP_INTO_RANGE : IRunControl.RM_STEP_INTO_RANGE;
+ if (ctx_data.canResume(mode) &&
+ pc != null && pc0 != null && pc1 != null &&
+ pc.compareTo(pc0) >= 0 && pc.compareTo(pc1) < 0) {
+ HashMap<String,Object> args = new HashMap<String,Object>();
+ args.put(IRunControl.RP_RANGE_START, pc0);
+ args.put(IRunControl.RP_RANGE_END, pc1);
+ ctx_data.resume(mode, 1, args, new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ return;
+ }
+ mode = step_back ? IRunControl.RM_REVERSE_STEP_INTO : IRunControl.RM_STEP_INTO;
+ if (ctx_data.canResume(mode)) {
+ ctx_data.resume(mode, 1, new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ return;
+ }
+ exit(new Exception("Step into is not supported"));
+ }
+
+ private boolean isSameLine(ILineNumbers.CodeArea x, ILineNumbers.CodeArea y) {
+ if (x == null || y == null) return false;
+ if (x.start_line != y.start_line) return false;
+ if (x.directory != y.directory && (x.directory == null || !x.directory.equals(y.directory))) return false;
+ if (x.file != y.file && (x.file == null || !x.file.equals(y.file))) return false;
+ return true;
+ }
+
+ protected void exit(Throwable error) {
+ if (exited) return;
+ exit(error, "Step Into");
+ if (error != null && node.getChannel().getState() == IChannel.STATE_OPEN) {
+ monitor.setStatus(new Status(IStatus.ERROR,
+ Activator.PLUGIN_ID, 0, "Cannot step: " + error.getLocalizedMessage(), error));
+ }
+ done.run();
+ }
+
+ protected void exit(Throwable error, String reason) {
+ if (exited) return;
+ rc.removeListener(this);
+ exited = true;
+ if (error == null) setActionResult(getContextID(), reason);
+ else launch.removeContextActions(getContextID());
+ done();
+ }
+
+ public void containerResumed(String[] context_ids) {
+ }
+
+ public void containerSuspended(String context, String pc,
+ String reason, Map<String, Object> params,
+ String[] suspended_ids) {
+ for (String id : suspended_ids) {
+ if (!id.equals(context)) contextSuspended(id, null, null, null);
+ }
+ contextSuspended(context, pc, reason, params);
+ }
+
+ public void contextAdded(RunControlContext[] contexts) {
+ }
+
+ public void contextChanged(RunControlContext[] contexts) {
+ }
+
+ public void contextException(String context, String msg) {
+ if (context.equals(node.getID())) exit(new Exception(msg));
+ }
+
+ public void contextRemoved(String[] context_ids) {
+ for (String context : context_ids) {
+ if (context.equals(node.getID())) exit(null);
+ }
+ }
+
+ public void contextResumed(String context) {
+ }
+
+ public void contextSuspended(String context, String pc, String reason, Map<String,Object> params) {
+ if (!context.equals(node.getID())) return;
+ Protocol.invokeLater(this);
+ }
+}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ActionStepOut.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ActionStepOut.java
new file mode 100644
index 000000000..83c19406b
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ActionStepOut.java
@@ -0,0 +1,245 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2015 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.ui.commands;
+
+import java.math.BigInteger;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
+import org.eclipse.tcf.internal.debug.actions.TCFAction;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFChildrenStackTrace;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IStackTrace;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.util.TCFDataCache;
+
+public class ActionStepOut extends TCFAction implements IRunControl.RunControlListener {
+
+ protected final TCFNodeExecContext node;
+ private final IDebugCommandRequest monitor;
+ private final Runnable done;
+ private final boolean step_back;
+ private final TCFNodeStackFrame drop_to_frame;
+ private final IRunControl rc;
+ private final IBreakpoints bps;
+
+ private int step_cnt;
+ private Map<String,Object> bp;
+
+ protected boolean exited;
+
+ public ActionStepOut(TCFNodeExecContext node, boolean step_back, TCFNodeStackFrame drop_to_frame,
+ IDebugCommandRequest monitor, Runnable done) {
+ super(node.getModel().getLaunch(), node.getID());
+ this.node = node;
+ this.step_back = step_back;
+ this.drop_to_frame = drop_to_frame;
+ this.monitor = monitor;
+ this.done = done;
+ rc = launch.getService(IRunControl.class);
+ bps = launch.getService(IBreakpoints.class);
+ }
+
+ public void run() {
+ if (exited) return;
+ try {
+ runAction();
+ }
+ catch (Throwable x) {
+ exit(x);
+ }
+ }
+
+ private void runAction() {
+ if (aborted) {
+ exit(null);
+ return;
+ }
+ TCFDataCache<TCFContextState> state = node.getState();
+ if (state == null) {
+ exit(new Exception("Invalid context ID"));
+ return;
+ }
+ if (!state.validate(this)) return;
+ if (state.getData() == null || !state.getData().is_suspended) {
+ Throwable error = state.getError();
+ if (error == null) error = new Exception("Context is not suspended");
+ exit(error);
+ return;
+ }
+ if (step_cnt == 0) {
+ rc.addListener(this);
+ }
+ TCFDataCache<IRunControl.RunControlContext> ctx_cache = node.getRunContext();
+ if (!ctx_cache.validate(this)) return;
+ IRunControl.RunControlContext ctx_data = ctx_cache.getData();
+ if (ctx_data == null) {
+ exit(ctx_cache.getError());
+ return;
+ }
+ int mode = step_back ? IRunControl.RM_REVERSE_STEP_OUT : IRunControl.RM_STEP_OUT;
+ if (drop_to_frame == null && ctx_data.canResume(mode)) {
+ if (step_cnt > 0) {
+ exit(null);
+ return;
+ }
+ ctx_data.resume(mode, 1, new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ step_cnt++;
+ return;
+ }
+ TCFChildrenStackTrace stack_trace = node.getStackTrace();
+ if (!stack_trace.validate(this)) return;
+ if (step_cnt > 0) {
+ TCFContextState state_data = state.getData();
+ if (isMyBreakpoint(state_data)) {
+ exit(null);
+ return;
+ }
+ exit(null, state_data.suspend_reason);
+ return;
+ }
+ if (bps != null && ctx_data.canResume(step_back ? IRunControl.RM_REVERSE_RESUME : IRunControl.RM_RESUME)) {
+ if (bp == null) {
+ TCFDataCache<IStackTrace.StackTraceContext> frame_cache =
+ (drop_to_frame != null ? drop_to_frame : stack_trace.getTopFrame()).getStackTraceContext();
+ if (!frame_cache.validate(this)) return;
+ IStackTrace.StackTraceContext frame_data = frame_cache.getData();
+ if (frame_data == null) {
+ exit(frame_cache.getError());
+ return;
+ }
+ Number addr = frame_data.getReturnAddress();
+ if (addr == null) {
+ exit(new Exception("Unknown stack frame return address"));
+ return;
+ }
+ if (step_back) {
+ BigInteger n = JSON.toBigInteger(addr);
+ addr = n.subtract(BigInteger.valueOf(1));
+ }
+ String id = STEP_BREAKPOINT_PREFIX + ctx_data.getID();
+ bp = new HashMap<String,Object>();
+ bp.put(IBreakpoints.PROP_ID, id);
+ bp.put(IBreakpoints.PROP_LOCATION, addr.toString());
+ bp.put(IBreakpoints.PROP_CONDITION, "$thread==\"" + ctx_data.getID() + "\"");
+ bp.put(IBreakpoints.PROP_ENABLED, Boolean.TRUE);
+ bps.add(bp, new IBreakpoints.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ }
+ ctx_data.resume(step_back ? IRunControl.RM_REVERSE_RESUME : IRunControl.RM_RESUME, 1, new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ step_cnt++;
+ return;
+ }
+ exit(new Exception("Step out is not supported"));
+ }
+
+ protected void exit(Throwable error) {
+ if (exited) return;
+ exit(error, "Step Out");
+ if (error != null && node.getChannel().getState() == IChannel.STATE_OPEN) {
+ monitor.setStatus(new Status(IStatus.ERROR,
+ Activator.PLUGIN_ID, 0, "Cannot step: " + error.getLocalizedMessage(), error));
+ }
+ done.run();
+ }
+
+ protected void exit(Throwable error, String reason) {
+ if (exited) return;
+ if (bp != null) {
+ bps.remove(new String[]{ (String)bp.get(IBreakpoints.PROP_ID) }, new IBreakpoints.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ }
+ });
+ }
+ rc.removeListener(this);
+ exited = true;
+ if (error == null) setActionResult(getContextID(), reason);
+ else launch.removeContextActions(getContextID());
+ done();
+ }
+
+ public void containerResumed(String[] context_ids) {
+ }
+
+ public void containerSuspended(String context, String pc,
+ String reason, Map<String, Object> params,
+ String[] suspended_ids) {
+ for (String id : suspended_ids) {
+ if (!id.equals(context)) contextSuspended(id, null, null, null);
+ }
+ contextSuspended(context, pc, reason, params);
+ }
+
+ public void contextAdded(RunControlContext[] contexts) {
+ }
+
+ public void contextChanged(RunControlContext[] contexts) {
+ }
+
+ public void contextException(String context, String msg) {
+ if (context.equals(node.getID())) exit(new Exception(msg));
+ }
+
+ public void contextRemoved(String[] context_ids) {
+ for (String context : context_ids) {
+ if (context.equals(node.getID())) exit(null);
+ }
+ }
+
+ public void contextResumed(String context) {
+ }
+
+ public void contextSuspended(String context, String pc, String reason, Map<String,Object> params) {
+ if (!context.equals(node.getID())) return;
+ Protocol.invokeLater(this);
+ }
+
+ private boolean isMyBreakpoint(TCFContextState state_data) {
+ if (bp == null) return false;
+ if (!IRunControl.REASON_BREAKPOINT.equals(state_data.suspend_reason)) return false;
+ if (state_data.suspend_params != null) {
+ Object ids = state_data.suspend_params.get(IRunControl.STATE_BREAKPOINT_IDS);
+ if (ids != null) {
+ @SuppressWarnings("unchecked")
+ Collection<String> c = (Collection<String>)ids;
+ if (c.contains(bp.get(IBreakpoints.PROP_ID))) return true;
+ }
+ }
+ if (state_data.suspend_pc == null) return false;
+ BigInteger x = new BigInteger(state_data.suspend_pc);
+ BigInteger y = new BigInteger((String)bp.get(IBreakpoints.PROP_LOCATION));
+ return x.equals(y);
+ }
+}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ActionStepOver.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ActionStepOver.java
new file mode 100644
index 000000000..e2a326cf6
--- /dev/null
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ActionStepOver.java
@@ -0,0 +1,405 @@
+/*******************************************************************************
+ * Copyright (c) 2010, 2015 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.tcf.internal.debug.ui.commands;
+
+import java.math.BigInteger;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.commands.IDebugCommandRequest;
+import org.eclipse.tcf.internal.debug.actions.TCFAction;
+import org.eclipse.tcf.internal.debug.model.TCFContextState;
+import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
+import org.eclipse.tcf.internal.debug.ui.Activator;
+import org.eclipse.tcf.internal.debug.ui.model.TCFChildrenStackTrace;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
+import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
+import org.eclipse.tcf.protocol.IChannel;
+import org.eclipse.tcf.protocol.IToken;
+import org.eclipse.tcf.protocol.JSON;
+import org.eclipse.tcf.protocol.Protocol;
+import org.eclipse.tcf.services.IBreakpoints;
+import org.eclipse.tcf.services.ILineNumbers;
+import org.eclipse.tcf.services.IRunControl;
+import org.eclipse.tcf.services.IStackTrace;
+import org.eclipse.tcf.services.IRunControl.RunControlContext;
+import org.eclipse.tcf.util.TCFDataCache;
+
+public class ActionStepOver extends TCFAction implements IRunControl.RunControlListener {
+
+ protected final TCFNodeExecContext node;
+ private final IDebugCommandRequest monitor;
+ private final Runnable done;
+ private boolean step_line;
+ private boolean step_back;
+ private final IRunControl rc;
+ private final IBreakpoints bps;
+
+ private TCFSourceRef source_ref;
+ private BigInteger pc0;
+ private BigInteger pc1;
+ private BigInteger fp;
+ private int step_cnt;
+ private Map<String,Object> bp;
+ private boolean second_step_back;
+ private boolean final_step;
+
+ protected boolean exited;
+
+ public ActionStepOver(TCFNodeExecContext node, boolean step_line, boolean step_back,
+ IDebugCommandRequest monitor, Runnable done) {
+ super(node.getModel().getLaunch(), node.getID());
+ this.node = node;
+ this.step_line = step_line;
+ this.step_back = step_back;
+ this.monitor = monitor;
+ this.done = done;
+ rc = launch.getService(IRunControl.class);
+ bps = launch.getService(IBreakpoints.class);
+ }
+
+ public void run() {
+ if (exited) return;
+ try {
+ runAction();
+ }
+ catch (Throwable x) {
+ exit(x);
+ }
+ }
+
+ private void setSourceRef(TCFSourceRef ref) {
+ ILineNumbers.CodeArea area = ref.area;
+ if (area != null) {
+ pc0 = JSON.toBigInteger(area.start_address);
+ pc1 = JSON.toBigInteger(area.end_address);
+ }
+ else {
+ pc0 = null;
+ pc1 = null;
+ }
+ source_ref = ref;
+ }
+
+ private void runAction() {
+ if (aborted) {
+ exit(null);
+ return;
+ }
+ TCFDataCache<TCFContextState> state_cache = node.getState();
+ if (state_cache == null) {
+ exit(new Exception("Invalid context ID"));
+ return;
+ }
+ if (!state_cache.validate(this)) return;
+ if (state_cache.getData() == null || !state_cache.getData().is_suspended) {
+ Throwable error = state_cache.getError();
+ if (error == null) error = new Exception("Context is not suspended");
+ exit(error);
+ return;
+ }
+ if (step_cnt == 0) {
+ rc.addListener(this);
+ }
+ else {
+ TCFContextState state_data = state_cache.getData();
+ if (!IRunControl.REASON_STEP.equals(state_data.suspend_reason) && !isMyBreakpoint(state_data)) {
+ exit(null, state_data.suspend_reason);
+ return;
+ }
+ }
+ TCFDataCache<IRunControl.RunControlContext> ctx_cache = node.getRunContext();
+ if (!ctx_cache.validate(this)) return;
+ IRunControl.RunControlContext ctx_data = ctx_cache.getData();
+ if (ctx_data == null) {
+ exit(ctx_cache.getError());
+ return;
+ }
+ int mode = 0;
+ if (!step_line) mode = step_back ? IRunControl.RM_REVERSE_STEP_OVER : IRunControl.RM_STEP_OVER;
+ else mode = step_back ? IRunControl.RM_REVERSE_STEP_OVER_LINE : IRunControl.RM_STEP_OVER_LINE;
+ if (ctx_data.canResume(mode)) {
+ if (step_cnt > 0) {
+ exit(null);
+ return;
+ }
+ ctx_data.resume(mode, 1, new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ step_cnt++;
+ return;
+ }
+ TCFChildrenStackTrace stack_trace = node.getStackTrace();
+ if (!stack_trace.validate(this)) return;
+ TCFNodeStackFrame frame_node = stack_trace.getTopFrame();
+ if (step_line && source_ref == null) {
+ TCFDataCache<TCFSourceRef> line_info = frame_node.getLineInfo();
+ if (!line_info.validate(this)) return;
+ TCFSourceRef ref = line_info.getData();
+ if (ref == null) {
+ step_line = false;
+ Protocol.invokeLater(this);
+ return;
+ }
+ if (ref.error != null) {
+ exit(ref.error);
+ return;
+ }
+ setSourceRef(ref);
+ }
+ TCFDataCache<IStackTrace.StackTraceContext> frame_cache = frame_node.getStackTraceContext();
+ if (!frame_cache.validate(this)) return;
+ IStackTrace.StackTraceContext frame_data = frame_cache.getData();
+ int frame_pos = 0;
+ if (step_cnt == 0) {
+ if (frame_data != null) {
+ fp = JSON.toBigInteger(frame_data.getFrameAddress());
+ }
+ if (fp == null) {
+ exit(new Exception("Unknown frame address"));
+ return;
+ }
+ }
+ else if (frame_data != null && fp.equals(JSON.toBigInteger(frame_data.getFrameAddress()))) {
+ frame_pos = 0;
+ }
+ else {
+ frame_pos = -1;
+ for (TCFNode n : stack_trace.getData().values()) {
+ TCFDataCache<IStackTrace.StackTraceContext> cache = ((TCFNodeStackFrame)n).getStackTraceContext();
+ if (!cache.validate(this)) return;
+ IStackTrace.StackTraceContext data = cache.getData();
+ if (data != null && fp.equals(JSON.toBigInteger(data.getFrameAddress()))) {
+ frame_pos = +1;
+ break;
+ }
+ }
+ }
+ if (bp != null) {
+ bps.remove(new String[]{ (String)bp.get(IBreakpoints.PROP_ID) }, new IBreakpoints.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ bp = null;
+ }
+ if (frame_pos > 0) {
+ mode = step_back ? IRunControl.RM_REVERSE_STEP_OUT : IRunControl.RM_STEP_OUT;
+ if (ctx_data.canResume(mode)) {
+ ctx_data.resume(mode, 1, new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ return;
+ }
+ mode = step_back ? IRunControl.RM_REVERSE_RESUME : IRunControl.RM_RESUME;
+ if (bps != null && ctx_data.canResume(mode)) {
+ Number addr = null;
+ if (frame_data != null) addr = frame_data.getReturnAddress();
+ if (addr == null) {
+ exit(new Exception("Unknown return address"));
+ return;
+ }
+ if (step_back) {
+ BigInteger n = JSON.toBigInteger(addr);
+ addr = n.subtract(BigInteger.valueOf(1));
+ }
+ String id = STEP_BREAKPOINT_PREFIX + ctx_data.getID();
+ bp = new HashMap<String,Object>();
+ bp.put(IBreakpoints.PROP_ID, id);
+ bp.put(IBreakpoints.PROP_LOCATION, addr.toString());
+ bp.put(IBreakpoints.PROP_CONDITION, "$thread==\"" + ctx_data.getID() + "\"");
+ bp.put(IBreakpoints.PROP_ENABLED, Boolean.TRUE);
+ bps.add(bp, new IBreakpoints.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ ctx_data.resume(mode, 1, new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ step_cnt++;
+ return;
+ }
+ exit(new Exception("Step over is not supported"));
+ return;
+ }
+ BigInteger pc = new BigInteger(state_cache.getData().suspend_pc);
+ if (step_cnt > 0) {
+ if (pc == null || pc0 == null || pc1 == null) {
+ exit(null);
+ return;
+ }
+ assert step_line;
+ if (pc.compareTo(pc0) < 0 || pc.compareTo(pc1) >= 0) {
+ TCFDataCache<TCFSourceRef> line_info = frame_node.getLineInfo();
+ if (!line_info.validate(this)) return;
+ TCFSourceRef ref = line_info.getData();
+ if (ref == null || ref.area == null) {
+ if (frame_pos < 0 && (stack_trace.getError() == null || step_cnt >= 10)) {
+ exit(stack_trace.getError());
+ return;
+ }
+ // No line info for current PC, continue stepping
+ }
+ else if (isSameLine(source_ref.area, ref.area)) {
+ setSourceRef(ref);
+ }
+ else if (step_back && !second_step_back) {
+ // After step back we stop at last instruction of previous line.
+ // Do second step back over line to skip that line.
+ second_step_back = true;
+ setSourceRef(ref);
+ }
+ else if (step_back && !final_step) {
+ // After second step back we have stepped one instruction more then needed.
+ // Do final step forward to correct that.
+ final_step = true;
+ step_back = false;
+ setSourceRef(ref);
+ }
+ else {
+ exit(null);
+ return;
+ }
+ }
+ }
+ step_cnt++;
+ mode = step_back ? IRunControl.RM_REVERSE_STEP_OVER : IRunControl.RM_STEP_OVER;
+ if (ctx_data.canResume(mode)) {
+ ctx_data.resume(mode, 1, new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ return;
+ }
+ mode = step_back ? IRunControl.RM_REVERSE_STEP_INTO_RANGE : IRunControl.RM_STEP_INTO_RANGE;
+ if (ctx_data.canResume(mode) &&
+ pc != null && pc0 != null && pc1 != null &&
+ pc.compareTo(pc0) >= 0 && pc.compareTo(pc1) < 0) {
+ HashMap<String,Object> args = new HashMap<String,Object>();
+ args.put(IRunControl.RP_RANGE_START, pc0);
+ args.put(IRunControl.RP_RANGE_END, pc1);
+ ctx_data.resume(mode, 1, args, new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ return;
+ }
+ mode = step_back ? IRunControl.RM_REVERSE_STEP_INTO : IRunControl.RM_STEP_INTO;
+ if (ctx_data.canResume(mode)) {
+ ctx_data.resume(mode, 1, new IRunControl.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ if (error != null) exit(error);
+ }
+ });
+ return;
+ }
+ exit(new Exception("Step over is not supported"));
+ }
+
+ protected void exit(Throwable error) {
+ if (exited) return;
+ exit(error, "Step Over");
+ if (error != null && node.getChannel().getState() == IChannel.STATE_OPEN) {
+ monitor.setStatus(new Status(IStatus.ERROR,
+ Activator.PLUGIN_ID, 0, "Cannot step: " + error.getLocalizedMessage(), error));
+ }
+ done.run();
+ }
+
+ protected void exit(Throwable error, String reason) {
+ if (exited) return;
+ if (bp != null) {
+ bps.remove(new String[]{ (String)bp.get(IBreakpoints.PROP_ID) }, new IBreakpoints.DoneCommand() {
+ public void doneCommand(IToken token, Exception error) {
+ }
+ });
+ }
+ rc.removeListener(this);
+ exited = true;
+ if (error == null) setActionResult(getContextID(), reason);
+ else launch.removeContextActions(getContextID());
+ done();
+ }
+
+ public void containerResumed(String[] context_ids) {
+ }
+
+ public void containerSuspended(String context, String pc,
+ String reason, Map<String, Object> params,
+ String[] suspended_ids) {
+ for (String id : suspended_ids) {
+ if (!id.equals(context)) contextSuspended(id, null, null, null);
+ }
+ contextSuspended(context, pc, reason, params);
+ }
+
+ public void contextAdded(RunControlContext[] contexts) {
+ }
+
+ public void contextChanged(RunControlContext[] contexts) {
+ }
+
+ public void contextException(String context, String msg) {
+ if (context.equals(node.getID())) exit(new Exception(msg));
+ }
+
+ public void contextRemoved(String[] context_ids) {
+ for (String context : context_ids) {
+ if (context.equals(node.getID())) exit(null);
+ }
+ }
+
+ public void contextResumed(String context) {
+ }
+
+ public void contextSuspended(String context, String pc, String reason, Map<String, Object> params) {
+ if (!context.equals(node.getID())) return;
+ Protocol.invokeLater(this);
+ }
+
+ private boolean isSameLine(ILineNumbers.CodeArea x, ILineNumbers.CodeArea y) {
+ if (x == null || y == null) return false;
+ if (x.start_line != y.start_line) return false;
+ if (x.directory != y.directory && (x.directory == null || !x.directory.equals(y.directory))) return false;
+ if (x.file != y.file && (x.file == null || !x.file.equals(y.file))) return false;
+ return true;
+ }
+
+ private boolean isMyBreakpoint(TCFContextState state_data) {
+ if (bp == null) return false;
+ if (!IRunControl.REASON_BREAKPOINT.equals(state_data.suspend_reason)) return false;
+ if (state_data.suspend_params != null) {
+ Object ids = state_data.suspend_params.get(IRunControl.STATE_BREAKPOINT_IDS);
+ if (ids != null) {
+ @SuppressWarnings("unchecked")
+ Collection<String> c = (Collection<String>)ids;
+ if (c.contains(bp.get(IBreakpoints.PROP_ID))) return true;
+ }
+ }
+ if (state_data.suspend_pc == null) return false;
+ BigInteger x = new BigInteger(state_data.suspend_pc);
+ BigInteger y = new BigInteger((String)bp.get(IBreakpoints.PROP_LOCATION));
+ return x.equals(y);
+ }
+}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackIntoCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackIntoCommand.java
index 222173159..c3b985470 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackIntoCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackIntoCommand.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2011 Wind River Systems, Inc. and others.
+ * Copyright (c) 2007, 2015 Wind River Systems, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,66 +10,13 @@
*******************************************************************************/
package org.eclipse.tcf.internal.debug.ui.commands;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
-import org.eclipse.tcf.internal.debug.actions.TCFActionStepInto;
-import org.eclipse.tcf.internal.debug.model.TCFContextState;
-import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
-import org.eclipse.tcf.internal.debug.ui.Activator;
import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.services.IRunControl;
-import org.eclipse.tcf.util.TCFDataCache;
public class BackIntoCommand extends StepCommand {
- private static class StepStateMachine extends TCFActionStepInto {
-
- private final IDebugCommandRequest monitor;
- private final Runnable done;
- private final TCFNodeExecContext node;
-
- StepStateMachine(TCFModel model, IDebugCommandRequest monitor,
- IRunControl.RunControlContext ctx, boolean src_step, Runnable done) {
- super(model.getLaunch(), ctx, src_step, true);
- this.monitor = monitor;
- this.done = done;
- node = (TCFNodeExecContext)model.getNode(ctx.getID());
- }
-
- @Override
- protected TCFDataCache<TCFContextState> getContextState() {
- if (node == null) return null;
- return node.getState();
- }
-
- @Override
- protected TCFDataCache<TCFSourceRef> getLineInfo() {
- TCFNodeStackFrame frame = node.getStackTrace().getTopFrame();
- if (frame == null) return null;
- return frame.getLineInfo();
- }
-
- @Override
- protected TCFDataCache<?> getStackTrace() {
- return node.getStackTrace();
- }
-
- @Override
- protected void exit(Throwable error) {
- if (exited) return;
- super.exit(error);
- if (error != null && node.getChannel().getState() == IChannel.STATE_OPEN) {
- monitor.setStatus(new Status(IStatus.ERROR,
- Activator.PLUGIN_ID, 0, "Cannot step: " + error.getLocalizedMessage(), error));
- }
- done.run();
- }
- }
-
public BackIntoCommand(TCFModel model) {
super(model);
}
@@ -83,8 +30,10 @@ public class BackIntoCommand extends StepCommand {
}
@Override
- protected void execute(final IDebugCommandRequest monitor, final IRunControl.RunControlContext ctx,
+ protected void execute(final IDebugCommandRequest monitor,
+ final IRunControl.RunControlContext ctx,
boolean src_step, final Runnable done) {
- new StepStateMachine(model, monitor, ctx, src_step, done);
+ TCFNodeExecContext node = (TCFNodeExecContext)model.getNode(ctx.getID());
+ new ActionStepInto(node, src_step, true, monitor, done);
}
}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackOverCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackOverCommand.java
index 86dfcc2e2..0e47a9b58 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackOverCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackOverCommand.java
@@ -10,84 +10,14 @@
*******************************************************************************/
package org.eclipse.tcf.internal.debug.ui.commands;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
-import org.eclipse.tcf.internal.debug.actions.TCFActionStepOver;
-import org.eclipse.tcf.internal.debug.model.TCFContextState;
-import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
-import org.eclipse.tcf.internal.debug.ui.Activator;
import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.services.IBreakpoints;
import org.eclipse.tcf.services.IRunControl;
-import org.eclipse.tcf.services.IStackTrace.StackTraceContext;
-import org.eclipse.tcf.util.TCFDataCache;
public class BackOverCommand extends StepCommand {
- private static class StepStateMachine extends TCFActionStepOver {
-
- private final IDebugCommandRequest monitor;
- private final Runnable done;
- private final TCFNodeExecContext node;
- private TCFNodeStackFrame frame;
-
- StepStateMachine(TCFModel model, IDebugCommandRequest monitor,
- IRunControl.RunControlContext ctx,
- boolean src_step, Runnable done) {
- super(model.getLaunch(), ctx, src_step, true);
- this.monitor = monitor;
- this.done = done;
- node = (TCFNodeExecContext)model.getNode(ctx.getID());
- }
-
- @Override
- protected TCFDataCache<TCFContextState> getContextState() {
- if (node == null) return null;
- return node.getState();
- }
-
- @Override
- protected TCFDataCache<TCFSourceRef> getLineInfo() {
- if (frame == null) frame = node.getStackTrace().getTopFrame();
- if (frame == null) return null;
- return frame.getLineInfo();
- }
-
- @Override
- protected TCFDataCache<StackTraceContext> getStackFrame() {
- if (frame == null) frame = node.getStackTrace().getTopFrame();
- if (frame == null) return null;
- return frame.getStackTraceContext();
- }
-
- @Override
- protected int getStackFrameIndex() {
- if (frame == null) frame = node.getStackTrace().getTopFrame();
- if (frame == null) return 0;
- return frame.getFrameNo();
- }
-
- @Override
- protected TCFDataCache<?> getStackTrace() {
- return node.getStackTrace();
- }
-
- @Override
- protected void exit(Throwable error) {
- if (exited) return;
- super.exit(error);
- if (error != null && node.getChannel().getState() == IChannel.STATE_OPEN) {
- monitor.setStatus(new Status(IStatus.ERROR,
- Activator.PLUGIN_ID, 0, "Cannot step: " + error.getLocalizedMessage(), error));
- }
- done.run();
- }
- }
-
public BackOverCommand(TCFModel model) {
super(model);
}
@@ -102,8 +32,10 @@ public class BackOverCommand extends StepCommand {
}
@Override
- protected void execute(final IDebugCommandRequest monitor, final IRunControl.RunControlContext ctx,
+ protected void execute(final IDebugCommandRequest monitor,
+ final IRunControl.RunControlContext ctx,
boolean src_step, final Runnable done) {
- new StepStateMachine(model, monitor, ctx, src_step, done);
+ TCFNodeExecContext node = (TCFNodeExecContext)model.getNode(ctx.getID());
+ new ActionStepOver(node, src_step, true, monitor, done);
}
}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackReturnCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackReturnCommand.java
index 06dbe85ed..0329f237e 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackReturnCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/BackReturnCommand.java
@@ -10,75 +10,14 @@
*******************************************************************************/
package org.eclipse.tcf.internal.debug.ui.commands;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
-import org.eclipse.tcf.internal.debug.actions.TCFActionStepOut;
-import org.eclipse.tcf.internal.debug.model.TCFContextState;
-import org.eclipse.tcf.internal.debug.ui.Activator;
import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.services.IBreakpoints;
import org.eclipse.tcf.services.IRunControl;
-import org.eclipse.tcf.services.IStackTrace.StackTraceContext;
-import org.eclipse.tcf.util.TCFDataCache;
public class BackReturnCommand extends StepCommand {
- private static class StepStateMachine extends TCFActionStepOut {
-
- private final IDebugCommandRequest monitor;
- private final Runnable done;
- private final TCFNodeExecContext node;
- private TCFNodeStackFrame frame;
-
- StepStateMachine(TCFModel model, IDebugCommandRequest monitor,
- IRunControl.RunControlContext ctx, Runnable done) {
- super(model.getLaunch(), ctx, true);
- this.monitor = monitor;
- this.done = done;
- node = (TCFNodeExecContext)model.getNode(ctx.getID());
- }
-
- @Override
- protected TCFDataCache<TCFContextState> getContextState() {
- if (node == null) return null;
- return node.getState();
- }
-
- @Override
- protected TCFDataCache<StackTraceContext> getStackFrame() {
- if (frame == null) frame = node.getStackTrace().getTopFrame();
- if (frame == null) return null;
- return frame.getStackTraceContext();
- }
-
- @Override
- protected int getStackFrameIndex() {
- if (frame == null) frame = node.getStackTrace().getTopFrame();
- if (frame == null) return 0;
- return frame.getFrameNo();
- }
-
- @Override
- protected TCFDataCache<?> getStackTrace() {
- return node.getStackTrace();
- }
-
- @Override
- protected void exit(Throwable error) {
- if (exited) return;
- super.exit(error);
- if (error != null && node.getChannel().getState() == IChannel.STATE_OPEN) {
- monitor.setStatus(new Status(IStatus.ERROR,
- Activator.PLUGIN_ID, 0, "Cannot step: " + error.getLocalizedMessage(), error));
- }
- done.run();
- }
- }
-
public BackReturnCommand(TCFModel model) {
super(model);
}
@@ -93,8 +32,10 @@ public class BackReturnCommand extends StepCommand {
}
@Override
- protected void execute(final IDebugCommandRequest monitor, final IRunControl.RunControlContext ctx,
+ protected void execute(final IDebugCommandRequest monitor,
+ final IRunControl.RunControlContext ctx,
boolean src_step, final Runnable done) {
- new StepStateMachine(model, monitor, ctx, done);
+ TCFNodeExecContext node = (TCFNodeExecContext)model.getNode(ctx.getID());
+ new ActionStepOut(node, true, null, monitor, done);
}
}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DropToFrameCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DropToFrameCommand.java
index de2989dc5..5a32c305c 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DropToFrameCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/DropToFrameCommand.java
@@ -12,24 +12,19 @@ package org.eclipse.tcf.internal.debug.ui.commands;
import java.util.Map;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IDropToFrameHandler;
import org.eclipse.debug.core.commands.IEnabledStateRequest;
-import org.eclipse.tcf.internal.debug.actions.TCFActionStepOut;
import org.eclipse.tcf.internal.debug.model.TCFContextState;
-import org.eclipse.tcf.internal.debug.ui.Activator;
import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
import org.eclipse.tcf.internal.debug.ui.model.TCFNode;
import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
import org.eclipse.tcf.internal.debug.ui.model.TCFRunnable;
-import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.services.IBreakpoints;
import org.eclipse.tcf.services.IRunControl;
import org.eclipse.tcf.services.IRunControl.RunControlContext;
-import org.eclipse.tcf.services.IStackTrace.StackTraceContext;
import org.eclipse.tcf.util.TCFDataCache;
/**
@@ -37,65 +32,10 @@ import org.eclipse.tcf.util.TCFDataCache;
*/
public class DropToFrameCommand implements IDropToFrameHandler {
- private static class StepStateMachine extends TCFActionStepOut {
-
- private final IDebugCommandRequest monitor;
- private final Runnable done;
- private final TCFNodeExecContext node;
- private final TCFNodeStackFrame frame;
-
- StepStateMachine(TCFModel model, IDebugCommandRequest monitor,
- IRunControl.RunControlContext ctx, TCFNodeStackFrame frame, Runnable done) {
- super(model.getLaunch(), ctx, false);
- this.monitor = monitor;
- this.done = done;
- this.frame = frame;
- this.node = (TCFNodeExecContext)frame.getParent();
- }
-
- @Override
- protected TCFDataCache<TCFContextState> getContextState() {
- return node.getState();
- }
-
- @Override
- protected TCFDataCache<StackTraceContext> getStackFrame() {
- return frame.getStackTraceContext();
- }
-
- @Override
- protected int getStackFrameIndex() {
- return frame.getFrameNo();
- }
-
- @Override
- protected TCFDataCache<?> getStackTrace() {
- return node.getStackTrace();
- }
-
- protected void exit(Throwable error) {
- exit(error, "Drop To Frame");
- }
-
- @Override
- protected void exit(Throwable error, String reason) {
- if (exited) return;
- super.exit(error, reason);
- if (error != null && node.getChannel().getState() == IChannel.STATE_OPEN) {
- monitor.setStatus(new Status(IStatus.ERROR,
- Activator.PLUGIN_ID, 0, "Cannot drop to frame: " + error.getLocalizedMessage(), error));
- }
- if (aborted) {
- monitor.setStatus(Status.CANCEL_STATUS);
- }
- done.run();
- }
- }
-
private final TCFModel model;
- public DropToFrameCommand(TCFModel tcfModel) {
- model = tcfModel;
+ public DropToFrameCommand(TCFModel model) {
+ this.model = model;
}
public void canExecute(final IEnabledStateRequest request) {
@@ -107,15 +47,15 @@ public class DropToFrameCommand implements IDropToFrameHandler {
done();
return;
}
- TCFNodeStackFrame frameNode = (TCFNodeStackFrame) elements[0];
- TCFNodeExecContext exeNode = (TCFNodeExecContext) frameNode.getParent();
- if (!exeNode.getStackTrace().validate(this)) return;
- if (frameNode.getFrameNo() < 1) {
+ TCFNodeStackFrame frame_node = (TCFNodeStackFrame)elements[0];
+ TCFNodeExecContext exe_node = (TCFNodeExecContext)frame_node.getParent();
+ if (!exe_node.getStackTrace().validate(this)) return;
+ if (frame_node.getFrameNo() < 1) {
request.setEnabled(false);
done();
return;
}
- TCFDataCache<IRunControl.RunControlContext> ctx_cache = exeNode.getRunContext();
+ TCFDataCache<IRunControl.RunControlContext> ctx_cache = exe_node.getRunContext();
if (!ctx_cache.validate(this)) {
return;
}
@@ -131,7 +71,7 @@ public class DropToFrameCommand implements IDropToFrameHandler {
done();
return;
}
- TCFDataCache<TCFContextState> state_cache = exeNode.getState();
+ TCFDataCache<TCFContextState> state_cache = exe_node.getState();
if (!state_cache.validate(this)) {
return;
}
@@ -159,18 +99,18 @@ public class DropToFrameCommand implements IDropToFrameHandler {
done();
return;
}
- final TCFNodeStackFrame frameNode = (TCFNodeStackFrame) elements[0];
- TCFNodeExecContext exeNode = (TCFNodeExecContext) frameNode.getParent();
- if (!exeNode.getStackTrace().validate(this)) return;
- int frameNo = frameNode.getFrameNo();
+ final TCFNodeStackFrame frame_node = (TCFNodeStackFrame)elements[0];
+ TCFNodeExecContext exe_node = (TCFNodeExecContext)frame_node.getParent();
+ if (!exe_node.getStackTrace().validate(this)) return;
+ int frameNo = frame_node.getFrameNo();
if (frameNo < 1) {
request.setStatus(Status.CANCEL_STATUS);
done();
return;
}
- TCFDataCache<IRunControl.RunControlContext> ctx_cache = exeNode.getRunContext();
+ TCFDataCache<IRunControl.RunControlContext> ctx_cache = exe_node.getRunContext();
if (!ctx_cache.validate(this)) return;
- TCFDataCache<TCFContextState> state_cache = exeNode.getState();
+ TCFDataCache<TCFContextState> state_cache = exe_node.getState();
if (!state_cache.validate(this)) return;
TCFContextState state_data = state_cache.getData();
if (state_data == null || !state_data.is_suspended) {
@@ -178,11 +118,11 @@ public class DropToFrameCommand implements IDropToFrameHandler {
done();
return;
}
- Map<String, TCFNode> stack = exeNode.getStackTrace().getData();
+ Map<String, TCFNode> stack = exe_node.getStackTrace().getData();
for (TCFNode node : stack.values()) {
TCFNodeStackFrame frame_to_step_out = (TCFNodeStackFrame) node;
if (frame_to_step_out.getFrameNo() == frameNo - 1) {
- new StepStateMachine(model, request, ctx_cache.getData(), frame_to_step_out, new Runnable() {
+ new ActionStepOut(exe_node, false, frame_to_step_out, request, new Runnable() {
public void run() {
request.done();
}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepIntoCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepIntoCommand.java
index cd9af635d..76610bfc0 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepIntoCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepIntoCommand.java
@@ -10,68 +10,15 @@
*******************************************************************************/
package org.eclipse.tcf.internal.debug.ui.commands;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IStepIntoHandler;
-import org.eclipse.tcf.internal.debug.actions.TCFActionStepInto;
-import org.eclipse.tcf.internal.debug.model.TCFContextState;
-import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
-import org.eclipse.tcf.internal.debug.ui.Activator;
import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.services.IRunControl;
-import org.eclipse.tcf.util.TCFDataCache;
public class StepIntoCommand extends StepCommand implements IStepIntoHandler {
- private static class StepStateMachine extends TCFActionStepInto {
-
- private final IDebugCommandRequest monitor;
- private final Runnable done;
- private final TCFNodeExecContext node;
-
- StepStateMachine(TCFModel model, IDebugCommandRequest monitor,
- IRunControl.RunControlContext ctx, boolean src_step, Runnable done) {
- super(model.getLaunch(), ctx, src_step, false);
- this.monitor = monitor;
- this.done = done;
- node = (TCFNodeExecContext)model.getNode(ctx.getID());
- }
-
- @Override
- protected TCFDataCache<TCFContextState> getContextState() {
- if (node == null) return null;
- return node.getState();
- }
-
- @Override
- protected TCFDataCache<TCFSourceRef> getLineInfo() {
- TCFNodeStackFrame frame = node.getStackTrace().getTopFrame();
- if (frame == null) return null;
- return frame.getLineInfo();
- }
-
- @Override
- protected TCFDataCache<?> getStackTrace() {
- return node.getStackTrace();
- }
-
- @Override
- protected void exit(Throwable error) {
- if (exited) return;
- super.exit(error);
- if (error != null && node.getChannel().getState() == IChannel.STATE_OPEN) {
- monitor.setStatus(new Status(IStatus.ERROR,
- Activator.PLUGIN_ID, 0, "Cannot step: " + error.getLocalizedMessage(), error));
- }
- done.run();
- }
- }
-
public StepIntoCommand(TCFModel model) {
super(model);
}
@@ -85,8 +32,10 @@ public class StepIntoCommand extends StepCommand implements IStepIntoHandler {
}
@Override
- protected void execute(final IDebugCommandRequest monitor, final IRunControl.RunControlContext ctx,
+ protected void execute(final IDebugCommandRequest monitor,
+ final IRunControl.RunControlContext ctx,
boolean src_step, final Runnable done) {
- new StepStateMachine(model, monitor, ctx, src_step, done);
+ TCFNodeExecContext node = (TCFNodeExecContext)model.getNode(ctx.getID());
+ new ActionStepInto(node, src_step, false, monitor, done);
}
}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepOverCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepOverCommand.java
index a97f5676c..909051a92 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepOverCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepOverCommand.java
@@ -10,85 +10,15 @@
*******************************************************************************/
package org.eclipse.tcf.internal.debug.ui.commands;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IStepOverHandler;
-import org.eclipse.tcf.internal.debug.actions.TCFActionStepOver;
-import org.eclipse.tcf.internal.debug.model.TCFContextState;
-import org.eclipse.tcf.internal.debug.model.TCFSourceRef;
-import org.eclipse.tcf.internal.debug.ui.Activator;
import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.services.IBreakpoints;
import org.eclipse.tcf.services.IRunControl;
-import org.eclipse.tcf.services.IStackTrace.StackTraceContext;
-import org.eclipse.tcf.util.TCFDataCache;
public class StepOverCommand extends StepCommand implements IStepOverHandler {
- private static class StepStateMachine extends TCFActionStepOver {
-
- private final IDebugCommandRequest monitor;
- private final Runnable done;
- private final TCFNodeExecContext node;
- private TCFNodeStackFrame frame;
-
- StepStateMachine(TCFModel model, IDebugCommandRequest monitor,
- IRunControl.RunControlContext ctx,
- boolean src_step, Runnable done) {
- super(model.getLaunch(), ctx, src_step, false);
- this.monitor = monitor;
- this.done = done;
- node = (TCFNodeExecContext)model.getNode(ctx.getID());
- }
-
- @Override
- protected TCFDataCache<TCFContextState> getContextState() {
- if (node == null) return null;
- return node.getState();
- }
-
- @Override
- protected TCFDataCache<TCFSourceRef> getLineInfo() {
- if (frame == null) frame = node.getStackTrace().getTopFrame();
- if (frame == null) return null;
- return frame.getLineInfo();
- }
-
- @Override
- protected TCFDataCache<StackTraceContext> getStackFrame() {
- if (frame == null) frame = node.getStackTrace().getTopFrame();
- if (frame == null) return null;
- return frame.getStackTraceContext();
- }
-
- @Override
- protected int getStackFrameIndex() {
- if (frame == null) frame = node.getStackTrace().getTopFrame();
- if (frame == null) return 0;
- return frame.getFrameNo();
- }
-
- @Override
- protected TCFDataCache<?> getStackTrace() {
- return node.getStackTrace();
- }
-
- @Override
- protected void exit(Throwable error) {
- if (exited) return;
- super.exit(error);
- if (error != null && node.getChannel().getState() == IChannel.STATE_OPEN) {
- monitor.setStatus(new Status(IStatus.ERROR,
- Activator.PLUGIN_ID, 0, "Cannot step: " + error.getLocalizedMessage(), error));
- }
- done.run();
- }
- }
-
public StepOverCommand(TCFModel model) {
super(model);
}
@@ -103,8 +33,10 @@ public class StepOverCommand extends StepCommand implements IStepOverHandler {
}
@Override
- protected void execute(final IDebugCommandRequest monitor, final IRunControl.RunControlContext ctx,
+ protected void execute(final IDebugCommandRequest monitor,
+ final IRunControl.RunControlContext ctx,
boolean src_step, final Runnable done) {
- new StepStateMachine(model, monitor, ctx, src_step, done);
+ TCFNodeExecContext node = (TCFNodeExecContext)model.getNode(ctx.getID());
+ new ActionStepOver(node, src_step, false, monitor, done);
}
}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepReturnCommand.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepReturnCommand.java
index 578f4e92c..61c6be8d4 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepReturnCommand.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/StepReturnCommand.java
@@ -10,77 +10,16 @@
*******************************************************************************/
package org.eclipse.tcf.internal.debug.ui.commands;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.commands.IDebugCommandRequest;
import org.eclipse.debug.core.commands.IStepReturnHandler;
-import org.eclipse.tcf.internal.debug.actions.TCFActionStepOut;
-import org.eclipse.tcf.internal.debug.model.TCFContextState;
-import org.eclipse.tcf.internal.debug.ui.Activator;
import org.eclipse.tcf.internal.debug.ui.model.TCFModel;
import org.eclipse.tcf.internal.debug.ui.model.TCFNodeExecContext;
-import org.eclipse.tcf.internal.debug.ui.model.TCFNodeStackFrame;
-import org.eclipse.tcf.protocol.IChannel;
import org.eclipse.tcf.services.IBreakpoints;
import org.eclipse.tcf.services.IRunControl;
-import org.eclipse.tcf.services.IStackTrace.StackTraceContext;
-import org.eclipse.tcf.util.TCFDataCache;
public class StepReturnCommand extends StepCommand implements IStepReturnHandler {
- private static class StepStateMachine extends TCFActionStepOut {
-
- private final IDebugCommandRequest monitor;
- private final Runnable done;
- private final TCFNodeExecContext node;
- private TCFNodeStackFrame frame;
-
- StepStateMachine(TCFModel model, IDebugCommandRequest monitor,
- IRunControl.RunControlContext ctx, Runnable done) {
- super(model.getLaunch(), ctx, false);
- this.monitor = monitor;
- this.done = done;
- node = (TCFNodeExecContext)model.getNode(ctx.getID());
- }
-
- @Override
- protected TCFDataCache<TCFContextState> getContextState() {
- if (node == null) return null;
- return node.getState();
- }
-
- @Override
- protected TCFDataCache<StackTraceContext> getStackFrame() {
- if (frame == null) frame = node.getStackTrace().getTopFrame();
- if (frame == null) return null;
- return frame.getStackTraceContext();
- }
-
- @Override
- protected int getStackFrameIndex() {
- if (frame == null) frame = node.getStackTrace().getTopFrame();
- if (frame == null) return 0;
- return frame.getFrameNo();
- }
-
- @Override
- protected TCFDataCache<?> getStackTrace() {
- return node.getStackTrace();
- }
-
- @Override
- protected void exit(Throwable error) {
- if (exited) return;
- super.exit(error);
- if (error != null && node.getChannel().getState() == IChannel.STATE_OPEN) {
- monitor.setStatus(new Status(IStatus.ERROR,
- Activator.PLUGIN_ID, 0, "Cannot step: " + error.getLocalizedMessage(), error));
- }
- done.run();
- }
- }
-
public StepReturnCommand(TCFModel model) {
super(model);
}
@@ -95,8 +34,10 @@ public class StepReturnCommand extends StepCommand implements IStepReturnHandler
}
@Override
- protected void execute(final IDebugCommandRequest monitor, final IRunControl.RunControlContext ctx,
+ protected void execute(final IDebugCommandRequest monitor,
+ final IRunControl.RunControlContext ctx,
boolean src_step, final Runnable done) {
- new StepStateMachine(model, monitor, ctx, done);
+ TCFNodeExecContext node = (TCFNodeExecContext)model.getNode(ctx.getID());
+ new ActionStepOut(node, false, null, monitor, done);
}
}
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ToggleFilterVariantsHandler.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ToggleFilterVariantsHandler.java
index eb573dc51..0ecc9de3e 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ToggleFilterVariantsHandler.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/commands/ToggleFilterVariantsHandler.java
@@ -32,10 +32,9 @@ public class ToggleFilterVariantsHandler extends AbstractHandler implements IEle
return null;
}
- @SuppressWarnings("rawtypes")
@Override
+ @SuppressWarnings("rawtypes")
public void updateElement(UIElement element, Map parameters) {
element.setChecked(TCFPreferences.getPreferenceStore().getBoolean(TCFPreferences.PREF_FILTER_VARIANTS_BY_DISCRIMINANT));
}
-
}
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepInto.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepInto.java
index cc68b0eed..cd7a78430 100644
--- a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepInto.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepInto.java
@@ -25,6 +25,7 @@ import org.eclipse.tcf.services.IRunControl;
import org.eclipse.tcf.services.IRunControl.RunControlContext;
import org.eclipse.tcf.util.TCFDataCache;
+@Deprecated
public abstract class TCFActionStepInto extends TCFAction implements IRunControl.RunControlListener {
private boolean step_line;
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 c24c86c0a..9752f3835 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
@@ -26,6 +26,7 @@ import org.eclipse.tcf.services.IStackTrace;
import org.eclipse.tcf.services.IRunControl.RunControlContext;
import org.eclipse.tcf.util.TCFDataCache;
+@Deprecated
public abstract class TCFActionStepOut extends TCFAction implements IRunControl.RunControlListener {
private final boolean step_back;
diff --git a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOver.java b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOver.java
index 52a738ffb..370902fd0 100644
--- a/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOver.java
+++ b/plugins/org.eclipse.tcf.debug/src/org/eclipse/tcf/internal/debug/actions/TCFActionStepOver.java
@@ -28,6 +28,7 @@ import org.eclipse.tcf.services.IStackTrace;
import org.eclipse.tcf.services.IRunControl.RunControlContext;
import org.eclipse.tcf.util.TCFDataCache;
+@Deprecated
public abstract class TCFActionStepOver extends TCFAction implements IRunControl.RunControlListener {
private boolean step_line;

Back to the top