diff options
Diffstat (limited to 'dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAWatchCommand.java')
-rw-r--r-- | dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAWatchCommand.java | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAWatchCommand.java b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAWatchCommand.java index 62c59ec2abd..c25a48476e0 100644 --- a/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAWatchCommand.java +++ b/dsf/org.eclipse.cdt.examples.dsf.pda/src/org/eclipse/cdt/examples/dsf/pda/service/commands/PDAWatchCommand.java @@ -7,7 +7,7 @@ * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 - * + * * Contributors: * Wind River Systems - initial API and implementation *******************************************************************************/ @@ -18,7 +18,7 @@ import org.eclipse.cdt.examples.dsf.pda.service.PDAVirtualMachineDMContext; /** * Sets a watchpoint on a given variable - * + * * <pre> * C: watch {function}::{variable_name} {watch_operation} * R: ok @@ -30,27 +30,30 @@ import org.eclipse.cdt.examples.dsf.pda.service.PDAVirtualMachineDMContext; @Immutable public class PDAWatchCommand extends AbstractPDACommand<PDACommandResult> { - public enum WatchOperation { READ, WRITE, BOTH, NONE }; - - private static int getWatchOperationCode(WatchOperation operation) { - switch (operation) { - case READ: - return 1; - case WRITE: - return 2; - case BOTH: - return 3; - default: - return 0; - } - } - - public PDAWatchCommand(PDAVirtualMachineDMContext context, String function, String variable, WatchOperation operation) { - super(context, "watch " + function+ "::" + variable + " " + getWatchOperationCode(operation)); - } - - @Override - public PDACommandResult createResult(String resultText) { - return new PDACommandResult(resultText); - } + public enum WatchOperation { + READ, WRITE, BOTH, NONE + }; + + private static int getWatchOperationCode(WatchOperation operation) { + switch (operation) { + case READ: + return 1; + case WRITE: + return 2; + case BOTH: + return 3; + default: + return 0; + } + } + + public PDAWatchCommand(PDAVirtualMachineDMContext context, String function, String variable, + WatchOperation operation) { + super(context, "watch " + function + "::" + variable + " " + getWatchOperationCode(operation)); + } + + @Override + public PDACommandResult createResult(String resultText) { + return new PDACommandResult(resultText); + } } |