1
/*******************************************************************************
2
* Copyright (c) 2004, 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
*******************************************************************************/
11
package org.eclipse.cdt.debug.core.model;
13
import org.eclipse.core.runtime.CoreException;
14
import org.eclipse.debug.core.model.IBreakpoint;
17
* A breakpoint specific to the C/C++ debug model. A C/C++ breakpoint supports:
19
* <li>a condition</li>
20
* <li>an ignore count</li>
21
* <li>a thread filter to restrict the breakpoint to a specific thread</li>
22
* <li>an installed property that indicates a breakpoint was successfully
23
* installed in debug target</li>
26
public interface ICBreakpoint extends IBreakpoint {
29
* Breakpoint attribute storing the number of debug targets a breakpoint is
31
* <code>"org.eclipse.cdt.debug.core.installCount"</code>). This
32
* attribute is an <code>int</code>.
34
* Note: this attribute is used only for notifying listeners
35
* (IBreakpointListener) of a change in the install count. The attribute is
36
* not used by the CDT breakpoint object to manage the install count, since
37
* it is a transient property of a breakpoint, and marker attributes are
38
* persisted. In other words, it's conceivable that upon breakpoint manager
39
* initialization, a breakpoint is reconstructed with this attribute being
40
* >0. That doesn't mean the breakpoint is installed (at workbench launch
41
* time, there are no installed breakpoints). At that time, the attribute
42
* means absolutely nothing.
44
public static final String INSTALL_COUNT = "org.eclipse.cdt.debug.core.installCount"; //$NON-NLS-1$
47
* Breakpoint attribute storing the conditional expression associated with
48
* this breakpoint (value <code>"org.eclipse.cdt.debug.core.condition"</code>).
49
* This attribute is a <code>String</code>.
51
public static final String CONDITION = "org.eclipse.cdt.debug.core.condition"; //$NON-NLS-1$
54
* Breakpoint attribute storing a breakpoint's ignore count value (value
55
* <code>"org.eclipse.cdt.debug.core.ignoreCount"</code>). This attribute
56
* is an <code>int</code>.
58
public static final String IGNORE_COUNT = "org.eclipse.cdt.debug.core.ignoreCount"; //$NON-NLS-1$
61
* Breakpoint attribute storing an identifier of the thread this breakpoint
62
* is restricted in (value <code>"org.eclipse.cdt.debug.core.threadId"</code>).
63
* This attribute is a <code>String</code>.
65
public static final String THREAD_ID = "org.eclipse.cdt.debug.core.threadId"; //$NON-NLS-1$
68
* Breakpoint attribute storing the source handle of the file this breakpoint
69
* is set in (value <code>"org.eclipse.cdt.debug.core.sourceHandle"</code>).
70
* This attribute is a <code>String</code>.
72
public static final String SOURCE_HANDLE = "org.eclipse.cdt.debug.core.sourceHandle"; //$NON-NLS-1$
75
* Breakpoint attribute storing the module name this breakpoint
76
* is set in (value <code>"org.eclipse.cdt.debug.core.module"</code>).
77
* This attribute is a <code>String</code>.
81
public static final String MODULE = "org.eclipse.cdt.debug.core.module"; //$NON-NLS-1$
84
* Returns whether this breakpoint is installed in at least one debug
87
* @return whether this breakpoint is installed
88
* @exception CoreException if unable to access the property on this breakpoint's
91
public boolean isInstalled() throws CoreException;
94
* Returns whether this breakpoint is conditional.
96
* @return whether this breakpoint is conditional
97
* @exception CoreException if unable to access the property on this breakpoint's
100
public boolean isConditional() throws CoreException;
103
* Returns the conditional expression associated with this breakpoint.
105
* @return this breakpoint's conditional expression
106
* @exception CoreException if unable to access the property on this breakpoint's
109
public String getCondition() throws CoreException;
112
* Sets the condition associated with this breakpoint.
114
* @param condition the conditional expression
115
* @exception CoreException if unable to access the property on this breakpoint's
118
public void setCondition( String condition ) throws CoreException;
121
* Returns the ignore count used by this breakpoint.
123
* @return the ignore count used by this breakpoint
124
* @exception CoreException if unable to access the property on this breakpoint's
127
public int getIgnoreCount() throws CoreException;
130
* Sets the ignore count attribute for this breakpoint.
132
* @param ignoreCount the new ignore count
133
* @exception CoreException if unable to access the property on this breakpoint's
136
public void setIgnoreCount( int ignoreCount ) throws CoreException;
139
* Returns the identifier of the thread this breakpoint is restricted in.
141
* @return the thread identifier
142
* @exception CoreException if unable to access the property on this breakpoint's
145
public String getThreadId() throws CoreException;
148
* Restricts this breakpoint to suspend only in the given thread when
149
* encounterd in the given thread's target.
151
* @param threadId the thread identifier
152
* @exception CoreException if unable to access the property on this breakpoint's
155
public void setThreadId( String threadId ) throws CoreException;
158
* Returns the module name this breakpoint is set in.
160
* @return the module name
161
* @exception CoreException if unable to access the property on this breakpoint's
164
public String getModule() throws CoreException;
167
* Sets the module name of this breakpoint.
169
* @param module the module name
170
* @exception CoreException if unable to access the property on this breakpoint's
173
public void setModule( String module ) throws CoreException;
176
* Returns the source handle this breakpoint is set in.
178
* @return the source handle
179
* @exception CoreException if unable to access the property on this breakpoint's
182
public String getSourceHandle() throws CoreException;
185
* Sets the source handle of this breakpoint.
187
* @param sourceHandle the source handle
188
* @exception CoreException if unable to access the property on this breakpoint's
191
public void setSourceHandle( String sourceHandle ) throws CoreException;
194
* Increments the install count of this breakpoint
196
* @return the new install count value
197
* @throws CoreException if unable to access the property
198
* on this breakpoint's underlying marker
200
public int incrementInstallCount() throws CoreException;
203
* Decrements the install count of this breakpoint.
205
* @return the new install caount value
206
* @throws CoreException if unable to access the property
207
* on this breakpoint's underlying marker
209
public int decrementInstallCount() throws CoreException;
212
* Resets the install count of this breakpoint
214
* @throws CoreException if unable to access the property
215
* on this breakpoint's underlying marker
217
public void resetInstallCount() throws CoreException;
220
* Returns a breakpoint extension registered for the given debug model
221
* and of the given type.
223
* @param debugModelId Debug model ID of the extension.
224
* @param extensionType Type of the extension.
225
* @return Extension instance.
226
* @throws CoreException Throws exception in case the extension doesn't exist or cannot be initialized.
228
public ICBreakpointExtension getExtension(String debugModelId, Class extensionType) throws CoreException ;