diff --git a/debug/org.eclipse.cdt.debug.core/plugin.xml b/debug/org.eclipse.cdt.debug.core/plugin.xml index f0d2bd64f4b..011367a78f7 100644 --- a/debug/org.eclipse.cdt.debug.core/plugin.xml +++ b/debug/org.eclipse.cdt.debug.core/plugin.xml @@ -102,6 +102,12 @@ + + + + @@ -120,6 +126,11 @@ class="org.eclipse.cdt.debug.internal.core.breakpoints.CFunctionBreakpoint" id="cFunctionBreakpoint"> + + diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICBreakpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICBreakpoint.java index 19fa29e7987..aab54fcbc03 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICBreakpoint.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICBreakpoint.java @@ -32,7 +32,7 @@ public interface ICBreakpoint extends IBreakpoint public static final String INSTALL_COUNT = "org.eclipse.cdt.debug.core.installCount"; //$NON-NLS-1$ /** - * Breakpoint attribute storing the the conditional expression + * Breakpoint attribute storing the conditional expression * associated with this breakpoint (value "org.eclipse.cdt.debug.core.condition"). * This attribute is a String. */ diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICWatchpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICWatchpoint.java new file mode 100644 index 00000000000..c255036bfb5 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICWatchpoint.java @@ -0,0 +1,58 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.core; + +import org.eclipse.core.runtime.CoreException; + +/** + * + * A watchpoint specific to the C/C++ debug model. + * + * @since Sep 4, 2002 + */ +public interface ICWatchpoint extends ICBreakpoint +{ + /** + * Watchpoint attribute storing the expression associated with this + * watchpoint (value "org.eclipse.cdt.debug.core.expression"). + * This attribute is a String. + */ + public static final String EXPRESSION = "org.eclipse.cdt.debug.core.expression"; //$NON-NLS-1$ + + /** + * Write access watchpoint attribute (value "org.eclipse.cdt.debug.core.write"). + * This attribute is a boolean. + */ + public static final String WRITE = "org.eclipse.cdt.debug.core.write"; //$NON-NLS-1$ + + /** + * Read access watchpoint attribute (value "org.eclipse.cdt.debug.core.read"). + * This attribute is a boolean. + */ + public static final String READ = "org.eclipse.cdt.debug.core.read"; //$NON-NLS-1$ + + /** + * Returns whether this watchppoint is a write watchpoint. + * + * @return whether this watchppoint is a write watchpoint + */ + boolean isWriteType() throws CoreException; + + /** + * Returns whether this watchppoint is a read watchpoint. + * + * @return whether this watchppoint is a read watchpoint + */ + boolean isReadType() throws CoreException; + + /** + * Returns the watchpoint's expression. + * + * @return the expression of this watchpoint + * @throws CDIException if this method fails. Reasons include: + */ + String getExpression() throws CoreException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CWatchpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CWatchpoint.java new file mode 100644 index 00000000000..42b06375e85 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CWatchpoint.java @@ -0,0 +1,76 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.internal.core.breakpoints; + +import java.util.Map; + +import org.eclipse.cdt.debug.core.ICWatchpoint; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.DebugException; + +/** + * + * Enter type comment. + * + * @since Sep 4, 2002 + */ +public class CWatchpoint extends CBreakpoint implements ICWatchpoint +{ + private static final String C_WATCHPOINT = "org.eclipse.cdt.debug.core.cWatchpointMarker"; //$NON-NLS-1$ + + /** + * Constructor for CWatchpoint. + */ + public CWatchpoint() + { + } + + /** + * Constructor for CWatchpoint. + * @param resource + * @param markerType + * @param attributes + * @param add + * @throws DebugException + */ + public CWatchpoint( IResource resource, Map attributes, boolean add ) throws DebugException + { + super( resource, getMarkerType(), attributes, add ); + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.core.ICWatchpoint#isWriteType() + */ + public boolean isWriteType() throws CoreException + { + return ensureMarker().getAttribute( WRITE, true ); + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.core.ICWatchpoint#isReadType() + */ + public boolean isReadType() throws CoreException + { + return ensureMarker().getAttribute( READ, false ); + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.debug.core.ICWatchpoint#getExpression() + */ + public String getExpression() throws CoreException + { + return ensureMarker().getAttribute( EXPRESSION, "" ); + } + + /** + * Returns the type of marker associated with this type of breakpoints + */ + public static String getMarkerType() + { + return C_WATCHPOINT; + } +} diff --git a/debug/org.eclipse.cdt.debug.ui/icons/full/obj16/readwrite_obj.gif b/debug/org.eclipse.cdt.debug.ui/icons/full/obj16/readwrite_obj.gif new file mode 100644 index 00000000000..0b1184d72a8 Binary files /dev/null and b/debug/org.eclipse.cdt.debug.ui/icons/full/obj16/readwrite_obj.gif differ diff --git a/debug/org.eclipse.cdt.debug.ui/icons/full/obj16/readwrite_obj_disabled.gif b/debug/org.eclipse.cdt.debug.ui/icons/full/obj16/readwrite_obj_disabled.gif new file mode 100644 index 00000000000..8eba2e1c289 Binary files /dev/null and b/debug/org.eclipse.cdt.debug.ui/icons/full/obj16/readwrite_obj_disabled.gif differ diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.properties b/debug/org.eclipse.cdt.debug.ui/plugin.properties index 6c77d2c81ce..01ffc8ee816 100644 --- a/debug/org.eclipse.cdt.debug.ui/plugin.properties +++ b/debug/org.eclipse.cdt.debug.ui/plugin.properties @@ -20,4 +20,5 @@ AddBreakpoint.label=Add/Remove &Breakpoint EnableBreakpoint.label=T&oggle Breakpoint BreakpointProperties.label=Breakpoint P&roperties... ManageBreakpointAction.label=Add/Remove C/C++ Brea&kpoint -BreakpointPropertiesAction.label=P&roperties... \ No newline at end of file +BreakpointPropertiesAction.label=P&roperties... +ManageWatchpointAction.label=Add/Remove C/C++ &Watchpoint diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.xml b/debug/org.eclipse.cdt.debug.ui/plugin.xml index 091f6b20c41..9970c4e8501 100644 --- a/debug/org.eclipse.cdt.debug.ui/plugin.xml +++ b/debug/org.eclipse.cdt.debug.ui/plugin.xml @@ -111,6 +111,21 @@ + + + + + +