org.eclipse.cdt.debug.core
Class CDIDebugModel

java.lang.Object
  extended by org.eclipse.cdt.debug.core.CDIDebugModel

public class CDIDebugModel
extends java.lang.Object

Provides utility methods for creating debug sessions, targets and breakpoints specific to the CDI debug model.


Constructor Summary
CDIDebugModel()
           
 
Method Summary
static ICAddressBreakpoint createAddressBreakpoint(java.lang.String module, java.lang.String sourceHandle, org.eclipse.core.resources.IResource resource, IAddress address, boolean enabled, int ignoreCount, java.lang.String condition, boolean register)
          Creates and returns an address breakpoint for the source defined by the given source handle, at the given address.
static ICAddressBreakpoint createAddressBreakpoint(java.lang.String module, java.lang.String sourceHandle, org.eclipse.core.resources.IResource resource, int lineNumber, IAddress address, boolean enabled, int ignoreCount, java.lang.String condition, boolean register)
          Creates and returns an address breakpoint for the source defined by the given source handle, at the given address.
static ICFunctionBreakpoint createFunctionBreakpoint(java.lang.String sourceHandle, org.eclipse.core.resources.IResource resource, java.lang.String function, int charStart, int charEnd, int lineNumber, boolean enabled, int ignoreCount, java.lang.String condition, boolean register)
          Creates and returns a breakpoint for the function defined by the given name.
static ICLineBreakpoint createLineBreakpoint(java.lang.String sourceHandle, org.eclipse.core.resources.IResource resource, int lineNumber, boolean enabled, int ignoreCount, java.lang.String condition, boolean register)
          Creates and returns a line breakpoint for the source defined by the given source handle, at the given line number.
static ICWatchpoint createWatchpoint(java.lang.String sourceHandle, org.eclipse.core.resources.IResource resource, boolean writeAccess, boolean readAccess, java.lang.String expression, boolean enabled, int ignoreCount, java.lang.String condition, boolean register)
          Creates and returns a watchpoint for the source defined by the given source handle, at the given expression.
static ICWatchpoint createWatchpoint(java.lang.String sourceHandle, org.eclipse.core.resources.IResource resource, int charStart, int charEnd, int lineNumber, boolean writeAccess, boolean readAccess, java.lang.String expression, boolean enabled, int ignoreCount, java.lang.String condition, boolean register)
          Creates and returns a watchpoint for the source defined by the given source handle, at the given expression.
static ICFunctionBreakpoint functionBreakpointExists(java.lang.String sourceHandle, org.eclipse.core.resources.IResource resource, java.lang.String function)
          Returns the function breakpoint that is already registered with the breakpoint manager for a source with the given handle and the given resource with the given function name.
static java.lang.String getPluginIdentifier()
          Returns the identifier for the CDI debug model plug-in
static ICLineBreakpoint lineBreakpointExists(java.lang.String sourceHandle, org.eclipse.core.resources.IResource resource, int lineNumber)
          Returns the line breakpoint that is already registered with the breakpoint manager for a source with the given handle and the given resource at the given line number.
static org.eclipse.debug.core.model.IDebugTarget newAttachDebugTarget(org.eclipse.debug.core.ILaunch launch, org.eclipse.cdt.debug.core.cdi.model.ICDITarget target, java.lang.String name, org.eclipse.debug.core.model.IProcess debuggerProcess, org.eclipse.core.resources.IFile file)
          Deprecated.  
static org.eclipse.debug.core.model.IDebugTarget newCoreFileDebugTarget(org.eclipse.debug.core.ILaunch launch, org.eclipse.cdt.debug.core.cdi.model.ICDITarget target, java.lang.String name, org.eclipse.debug.core.model.IProcess debuggerProcess, org.eclipse.core.resources.IFile file)
          Deprecated.  
static org.eclipse.debug.core.model.IDebugTarget newDebugTarget(org.eclipse.debug.core.ILaunch launch, org.eclipse.cdt.debug.core.cdi.model.ICDITarget target, java.lang.String name, org.eclipse.debug.core.model.IProcess iprocess, org.eclipse.debug.core.model.IProcess debuggerProcess, org.eclipse.core.resources.IFile file, boolean allowTerminate, boolean allowDisconnect, boolean stopInMain)
          Deprecated.  
static org.eclipse.debug.core.model.IDebugTarget newDebugTarget(org.eclipse.debug.core.ILaunch launch, org.eclipse.core.resources.IProject project, org.eclipse.cdt.debug.core.cdi.model.ICDITarget cdiTarget, java.lang.String name, org.eclipse.debug.core.model.IProcess debuggeeProcess, IBinaryParser.IBinaryObject file, boolean allowTerminate, boolean allowDisconnect, boolean resumeTarget)
          Creates and returns a debug target for the given CDI target, with the specified name, and associates it with the given process for console I/O.
static org.eclipse.debug.core.model.IDebugTarget newDebugTarget(org.eclipse.debug.core.ILaunch launch, org.eclipse.core.resources.IProject project, org.eclipse.cdt.debug.core.cdi.model.ICDITarget cdiTarget, java.lang.String name, org.eclipse.debug.core.model.IProcess debuggeeProcess, IBinaryParser.IBinaryObject file, boolean allowTerminate, boolean allowDisconnect, boolean stopInMain, boolean resumeTarget)
          Deprecated.  
static org.eclipse.debug.core.model.IDebugTarget newDebugTarget(org.eclipse.debug.core.ILaunch launch, org.eclipse.core.resources.IProject project, org.eclipse.cdt.debug.core.cdi.model.ICDITarget cdiTarget, java.lang.String name, org.eclipse.debug.core.model.IProcess debuggeeProcess, IBinaryParser.IBinaryObject file, boolean allowTerminate, boolean allowDisconnect, java.lang.String stopSymbol, boolean resumeTarget)
          Creates and returns a debug target for the given CDI target, with the specified name, and associates it with the given process for console I/O.
static ICWatchpoint watchpointExists(java.lang.String sourceHandle, org.eclipse.core.resources.IResource resource, java.lang.String expression)
          Returns the watchpoint that is already registered with the breakpoint manager for a source with the given handle and the given resource at the given expression.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CDIDebugModel

public CDIDebugModel()
Method Detail

getPluginIdentifier

public static java.lang.String getPluginIdentifier()
Returns the identifier for the CDI debug model plug-in

Returns:
plugin identifier

newDebugTarget

public static org.eclipse.debug.core.model.IDebugTarget newDebugTarget(org.eclipse.debug.core.ILaunch launch,
                                                                       org.eclipse.core.resources.IProject project,
                                                                       org.eclipse.cdt.debug.core.cdi.model.ICDITarget cdiTarget,
                                                                       java.lang.String name,
                                                                       org.eclipse.debug.core.model.IProcess debuggeeProcess,
                                                                       IBinaryParser.IBinaryObject file,
                                                                       boolean allowTerminate,
                                                                       boolean allowDisconnect,
                                                                       java.lang.String stopSymbol,
                                                                       boolean resumeTarget)
                                                                throws org.eclipse.debug.core.DebugException
Creates and returns a debug target for the given CDI target, with the specified name, and associates it with the given process for console I/O. The debug target is added to the given launch.

Parameters:
launch - the launch the new debug target will be contained in
project - the project to use to persist breakpoints.
cdiTarget - the CDI target to create a debug target for
name - the name to associate with this target, which will be returned from IDebugTarget.getName.
debuggeeProcess - the process to associate with the debug target, which will be returned from IDebugTarget.getProcess
file - the executable to debug.
allowTerminate - allow terminate().
allowDisconnect - allow disconnect().
stopSymbol - place temporary breakpoint at stopSymbol, ignore if null or empty.
resumeTarget - resume target.
Returns:
a debug target
Throws:
org.eclipse.debug.core.DebugException
Since:
3.1

newDebugTarget

public static org.eclipse.debug.core.model.IDebugTarget newDebugTarget(org.eclipse.debug.core.ILaunch launch,
                                                                       org.eclipse.core.resources.IProject project,
                                                                       org.eclipse.cdt.debug.core.cdi.model.ICDITarget cdiTarget,
                                                                       java.lang.String name,
                                                                       org.eclipse.debug.core.model.IProcess debuggeeProcess,
                                                                       IBinaryParser.IBinaryObject file,
                                                                       boolean allowTerminate,
                                                                       boolean allowDisconnect,
                                                                       boolean stopInMain,
                                                                       boolean resumeTarget)
                                                                throws org.eclipse.debug.core.DebugException
Deprecated. 

Creates and returns a debug target for the given CDI target, with the specified name, and associates it with the given process for console I/O. The debug target is added to the given launch.

Parameters:
launch - the launch the new debug target will be contained in
project - the project to use to persist breakpoints.
cdiTarget - the CDI target to create a debug target for
name - the name to associate with this target, which will be returned from IDebugTarget.getName.
debuggeeProcess - the process to associate with the debug target, which will be returned from IDebugTarget.getProcess
file - the executable to debug.
allowTerminate - allow terminate().
allowDisconnect - allow disconnect().
stopInMain - place temporary breakpoint at main()
resumeTarget - resume target.
Returns:
a debug target
Throws:
org.eclipse.debug.core.DebugException

newDebugTarget

public static org.eclipse.debug.core.model.IDebugTarget newDebugTarget(org.eclipse.debug.core.ILaunch launch,
                                                                       org.eclipse.core.resources.IProject project,
                                                                       org.eclipse.cdt.debug.core.cdi.model.ICDITarget cdiTarget,
                                                                       java.lang.String name,
                                                                       org.eclipse.debug.core.model.IProcess debuggeeProcess,
                                                                       IBinaryParser.IBinaryObject file,
                                                                       boolean allowTerminate,
                                                                       boolean allowDisconnect,
                                                                       boolean resumeTarget)
                                                                throws org.eclipse.debug.core.DebugException
Creates and returns a debug target for the given CDI target, with the specified name, and associates it with the given process for console I/O. The debug target is added to the given launch.

Parameters:
launch - the launch the new debug target will be contained in
project - the project to use to persist breakpoints.
cdiTarget - the CDI target to create a debug target for
name - the name to associate with this target, which will be returned from IDebugTarget.getName.
debuggeeProcess - the process to associate with the debug target, which will be returned from IDebugTarget.getProcess
file - the executable to debug.
allowTerminate - allow terminate().
allowDisconnect - allow disconnect().
resumeTarget - resume target.
Returns:
a debug target
Throws:
org.eclipse.debug.core.DebugException

createLineBreakpoint

public static ICLineBreakpoint createLineBreakpoint(java.lang.String sourceHandle,
                                                    org.eclipse.core.resources.IResource resource,
                                                    int lineNumber,
                                                    boolean enabled,
                                                    int ignoreCount,
                                                    java.lang.String condition,
                                                    boolean register)
                                             throws org.eclipse.core.runtime.CoreException
Creates and returns a line breakpoint for the source defined by the given source handle, at the given line number. The marker associated with the breakpoint will be created on the specified resource.

Parameters:
sourceHandle - the handle to the breakpoint source
resource - the resource on which to create the associated breakpoint marker
lineNumber - the line number on which the breakpoint is set - line numbers are 1 based, associated with the source file in which the breakpoint is set
enabled - whether to enable or disable this breakpoint
ignoreCount - the number of times this breakpoint will be ignored
condition - the breakpoint condition
register - whether to add this breakpoint to the breakpoint manager
Returns:
a line breakpoint
Throws:
org.eclipse.core.runtime.CoreException - if this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.

createAddressBreakpoint

public static ICAddressBreakpoint createAddressBreakpoint(java.lang.String module,
                                                          java.lang.String sourceHandle,
                                                          org.eclipse.core.resources.IResource resource,
                                                          IAddress address,
                                                          boolean enabled,
                                                          int ignoreCount,
                                                          java.lang.String condition,
                                                          boolean register)
                                                   throws org.eclipse.core.runtime.CoreException
Creates and returns an address breakpoint for the source defined by the given source handle, at the given address. The marker associated with the breakpoint will be created on the specified resource.

Parameters:
module - the module name the breakpoint is set in
sourceHandle - the handle to the breakpoint source
resource - the resource on which to create the associated breakpoint marker
address - the address on which the breakpoint is set
enabled - whether to enable or disable this breakpoint
ignoreCount - the number of times this breakpoint will be ignored
condition - the breakpoint condition
register - whether to add this breakpoint to the breakpoint manager
Returns:
an address breakpoint
Throws:
org.eclipse.core.runtime.CoreException - if this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.

createAddressBreakpoint

public static ICAddressBreakpoint createAddressBreakpoint(java.lang.String module,
                                                          java.lang.String sourceHandle,
                                                          org.eclipse.core.resources.IResource resource,
                                                          int lineNumber,
                                                          IAddress address,
                                                          boolean enabled,
                                                          int ignoreCount,
                                                          java.lang.String condition,
                                                          boolean register)
                                                   throws org.eclipse.core.runtime.CoreException
Creates and returns an address breakpoint for the source defined by the given source handle, at the given address. The marker associated with the breakpoint will be created on the specified resource.

Parameters:
module - the module name the breakpoint is set in
sourceHandle - the handle to the breakpoint source
resource - the resource on which to create the associated breakpoint marker
lineNumber - the line number in the source file
address - the address on which the breakpoint is set
enabled - whether to enable or disable this breakpoint
ignoreCount - the number of times this breakpoint will be ignored
condition - the breakpoint condition
register - whether to add this breakpoint to the breakpoint manager
Returns:
an address breakpoint
Throws:
org.eclipse.core.runtime.CoreException - if this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.

createWatchpoint

public static ICWatchpoint createWatchpoint(java.lang.String sourceHandle,
                                            org.eclipse.core.resources.IResource resource,
                                            boolean writeAccess,
                                            boolean readAccess,
                                            java.lang.String expression,
                                            boolean enabled,
                                            int ignoreCount,
                                            java.lang.String condition,
                                            boolean register)
                                     throws org.eclipse.core.runtime.CoreException
Creates and returns a watchpoint for the source defined by the given source handle, at the given expression. The marker associated with the watchpoint will be created on the specified resource.

Parameters:
sourceHandle - the handle to the watchpoint source
resource - the resource on which to create the associated watchpoint marker
writeAccess - whether this is write watchpoint
readAccess - whether this is read watchpoint
expression - the expression on which the watchpoint is set
enabled - whether to enable or disable this breakpoint
ignoreCount - the number of times this breakpoint will be ignored
condition - the breakpoint condition
register - whether to add this breakpoint to the breakpoint manager
Returns:
a watchpoint
Throws:
org.eclipse.core.runtime.CoreException - if this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.

createWatchpoint

public static ICWatchpoint createWatchpoint(java.lang.String sourceHandle,
                                            org.eclipse.core.resources.IResource resource,
                                            int charStart,
                                            int charEnd,
                                            int lineNumber,
                                            boolean writeAccess,
                                            boolean readAccess,
                                            java.lang.String expression,
                                            boolean enabled,
                                            int ignoreCount,
                                            java.lang.String condition,
                                            boolean register)
                                     throws org.eclipse.core.runtime.CoreException
Creates and returns a watchpoint for the source defined by the given source handle, at the given expression. The marker associated with the watchpoint will be created on the specified resource.

Parameters:
sourceHandle - the handle to the watchpoint source
resource - the resource on which to create the associated watchpoint marker
charStart - the first character index associated with the watchpoint, or -1 if unspecified, in the source file in which the watchpoint is set
charEnd - the last character index associated with the watchpoint, or -1 if unspecified, in the source file in which the watchpoint is set
lineNumber - the lineNumber on which the watchpoint is set, or -1 if unspecified - line numbers are 1 based, associated with the source file in which the watchpoint is set
writeAccess - whether this is write watchpoint
readAccess - whether this is read watchpoint
expression - the expression on which the watchpoint is set
enabled - whether to enable or disable this breakpoint
ignoreCount - the number of times this breakpoint will be ignored
condition - the breakpoint condition
register - whether to add this breakpoint to the breakpoint manager
Returns:
a watchpoint
Throws:
org.eclipse.core.runtime.CoreException - if this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.

createFunctionBreakpoint

public static ICFunctionBreakpoint createFunctionBreakpoint(java.lang.String sourceHandle,
                                                            org.eclipse.core.resources.IResource resource,
                                                            java.lang.String function,
                                                            int charStart,
                                                            int charEnd,
                                                            int lineNumber,
                                                            boolean enabled,
                                                            int ignoreCount,
                                                            java.lang.String condition,
                                                            boolean register)
                                                     throws org.eclipse.core.runtime.CoreException
Creates and returns a breakpoint for the function defined by the given name. The marker associated with the breakpoint will be created on the specified resource.

Parameters:
sourceHandle - the handle to the breakpoint source
resource - the resource on which to create the associated breakpoint marker
function - the name of the function this breakpoint suspends execution in
charStart - the first character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
charEnd - the last character index associated with the breakpoint, or -1 if unspecified, in the source file in which the breakpoint is set
lineNumber - the lineNumber on which the breakpoint is set, or -1 if unspecified - line numbers are 1 based, associated with the source file in which the breakpoint is set
enabled - whether to enable or disable this breakpoint
ignoreCount - the number of times this breakpoint will be ignored
condition - the breakpoint condition
register - whether to add this breakpoint to the breakpoint manager
Returns:
an address breakpoint
Throws:
org.eclipse.core.runtime.CoreException - if this method fails. Reasons include:
  • Failure creating underlying marker. The exception's status contains the underlying exception responsible for the failure.

lineBreakpointExists

public static ICLineBreakpoint lineBreakpointExists(java.lang.String sourceHandle,
                                                    org.eclipse.core.resources.IResource resource,
                                                    int lineNumber)
                                             throws org.eclipse.core.runtime.CoreException
Returns the line breakpoint that is already registered with the breakpoint manager for a source with the given handle and the given resource at the given line number.

Parameters:
sourceHandle - the source handle
resource - the breakpoint resource
lineNumber - the line number
Returns:
the line breakpoint that is already registered with the breakpoint manager or null if no such breakpoint is registered
Throws:
org.eclipse.core.runtime.CoreException - if unable to retrieve the associated marker attributes (line number).

watchpointExists

public static ICWatchpoint watchpointExists(java.lang.String sourceHandle,
                                            org.eclipse.core.resources.IResource resource,
                                            java.lang.String expression)
                                     throws org.eclipse.core.runtime.CoreException
Returns the watchpoint that is already registered with the breakpoint manager for a source with the given handle and the given resource at the given expression.

Parameters:
sourceHandle - the source handle
resource - the breakpoint resource
expression - the expression
Returns:
the watchpoint that is already registered with the breakpoint manager or null if no such watchpoint is registered
Throws:
org.eclipse.core.runtime.CoreException - if unable to retrieve the associated marker attributes (line number).

functionBreakpointExists

public static ICFunctionBreakpoint functionBreakpointExists(java.lang.String sourceHandle,
                                                            org.eclipse.core.resources.IResource resource,
                                                            java.lang.String function)
                                                     throws org.eclipse.core.runtime.CoreException
Returns the function breakpoint that is already registered with the breakpoint manager for a source with the given handle and the given resource with the given function name.

Parameters:
sourceHandle - the source handle
resource - the breakpoint resource
function - the fully qualified function name
Returns:
the breakpoint that is already registered with the breakpoint manager or null if no such breakpoint is registered
Throws:
org.eclipse.core.runtime.CoreException - if unable to retrieve the associated marker attributes (line number).

newDebugTarget

public static org.eclipse.debug.core.model.IDebugTarget newDebugTarget(org.eclipse.debug.core.ILaunch launch,
                                                                       org.eclipse.cdt.debug.core.cdi.model.ICDITarget target,
                                                                       java.lang.String name,
                                                                       org.eclipse.debug.core.model.IProcess iprocess,
                                                                       org.eclipse.debug.core.model.IProcess debuggerProcess,
                                                                       org.eclipse.core.resources.IFile file,
                                                                       boolean allowTerminate,
                                                                       boolean allowDisconnect,
                                                                       boolean stopInMain)
                                                                throws org.eclipse.core.runtime.CoreException
Deprecated. 

Throws:
org.eclipse.core.runtime.CoreException

newAttachDebugTarget

public static org.eclipse.debug.core.model.IDebugTarget newAttachDebugTarget(org.eclipse.debug.core.ILaunch launch,
                                                                             org.eclipse.cdt.debug.core.cdi.model.ICDITarget target,
                                                                             java.lang.String name,
                                                                             org.eclipse.debug.core.model.IProcess debuggerProcess,
                                                                             org.eclipse.core.resources.IFile file)
                                                                      throws org.eclipse.core.runtime.CoreException
Deprecated. 

Throws:
org.eclipse.core.runtime.CoreException

newCoreFileDebugTarget

public static org.eclipse.debug.core.model.IDebugTarget newCoreFileDebugTarget(org.eclipse.debug.core.ILaunch launch,
                                                                               org.eclipse.cdt.debug.core.cdi.model.ICDITarget target,
                                                                               java.lang.String name,
                                                                               org.eclipse.debug.core.model.IProcess debuggerProcess,
                                                                               org.eclipse.core.resources.IFile file)
                                                                        throws org.eclipse.core.runtime.CoreException
Deprecated. 

Throws:
org.eclipse.core.runtime.CoreException