1
/*******************************************************************************
2
* Copyright (c) 2000, 2006 QNX Software Systems and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* QNX Software Systems - Initial API and implementation
10
*******************************************************************************/
12
package org.eclipse.cdt.debug.mi.core.command;
14
import org.eclipse.cdt.debug.mi.core.MIException;
15
import org.eclipse.cdt.debug.mi.core.output.MIBreakWatchInfo;
16
import org.eclipse.cdt.debug.mi.core.output.MIInfo;
17
import org.eclipse.cdt.debug.mi.core.output.MIOutput;
21
* -break-watch [ -a | -r ]
23
* Create a watchpoint. With the `-a' option it will create an
24
* "access" watchpoint, i.e. a watchpoint that triggers either on a read
25
* from or on a write to the memory location. With the `-r' option, the
26
* watchpoint created is a "read" watchpoint, i.e. it will trigger only
27
* when the memory location is accessed for reading. Without either of
28
* the options, the watchpoint created is a regular watchpoint, i.e. it
29
* will trigger when the memory location is accessed for writing.
32
public class MIBreakWatch extends MICommand
34
public MIBreakWatch (String miVersion, boolean access, boolean read, String expr) {
35
super(miVersion, "-break-watch");//$NON-NLS-1$
38
opts = new String[] {"-a"}; //$NON-NLS-1$
40
opts = new String[] {"-r"}; //$NON-NLS-1$
45
setParameters(new String[]{expr});
48
public MIBreakWatchInfo getMIBreakWatchInfo() throws MIException {
49
return (MIBreakWatchInfo)getMIInfo();
52
public MIInfo getMIInfo() throws MIException {
54
MIOutput out = getMIOutput();
56
info = new MIBreakWatchInfo(out);
58
throwMIException(info, out);