From 4bf4ae2c2877b4712f046d53328f795734454b82 Mon Sep 17 00:00:00 2001 From: Mikhail Khodjaiants Date: Thu, 18 Jul 2002 19:45:55 +0000 Subject: [PATCH] First draft of CDI. --- debug/org.eclipse.cdt.debug.core/.classpath | 12 + debug/org.eclipse.cdt.debug.core/.project | 28 ++ debug/org.eclipse.cdt.debug.core/.template | 4 + .../build.properties | 1 + debug/org.eclipse.cdt.debug.core/plugin.xml | 19 ++ .../cdt/debug/core/CDebugCorePlugin.java | 46 ++++ .../cdt/debug/core/cdi/CDIException.java | 27 ++ .../cdt/debug/core/cdi/ICBreakpoint.java | 84 ++++++ .../debug/core/cdi/ICBreakpointManager.java | 107 ++++++++ .../cdt/debug/core/cdi/ICCatchEvent.java | 18 ++ .../cdt/debug/core/cdi/ICCatchpoint.java | 24 ++ .../cdt/debug/core/cdi/ICCondition.java | 44 ++++ .../debug/core/cdi/ICEndSteppingRange.java | 17 ++ .../cdt/debug/core/cdi/ICEventManager.java | 37 +++ .../cdt/debug/core/cdi/ICExitInfo.java | 26 ++ .../debug/core/cdi/ICExpressionManager.java | 62 +++++ .../cdt/debug/core/cdi/ICLocation.java | 71 +++++ .../debug/core/cdi/ICLocationBreakpoint.java | 24 ++ .../cdt/debug/core/cdi/ICMemoryManager.java | 67 +++++ .../eclipse/cdt/debug/core/cdi/ICSession.java | 98 +++++++ .../cdt/debug/core/cdi/ICSessionObject.java | 22 ++ .../eclipse/cdt/debug/core/cdi/ICSignal.java | 30 +++ .../cdt/debug/core/cdi/ICSignalManager.java | 24 ++ .../cdt/debug/core/cdi/ICSourceManager.java | 41 +++ .../cdt/debug/core/cdi/ICWatchpoint.java | 41 +++ .../debug/core/cdi/event/ICChangedEvent.java | 17 ++ .../debug/core/cdi/event/ICCreatedEvent.java | 22 ++ .../core/cdi/event/ICDisconnectedEvent.java | 21 ++ .../cdt/debug/core/cdi/event/ICEvent.java | 25 ++ .../debug/core/cdi/event/ICEventListener.java | 24 ++ .../debug/core/cdi/event/ICExitedEvent.java | 29 +++ .../debug/core/cdi/event/ICLoadedEvent.java | 21 ++ .../core/cdi/event/ICRestartedEvent.java | 21 ++ .../debug/core/cdi/event/ICResumedEvent.java | 21 ++ .../debug/core/cdi/event/ICSteppingEvent.java | 29 +++ .../core/cdi/event/ICSuspendedEvent.java | 45 ++++ .../core/cdi/event/ICTerminatedEvent.java | 21 ++ .../debug/core/cdi/model/ICExpression.java | 34 +++ .../core/cdi/model/ICGlobalVariable.java | 17 ++ .../debug/core/cdi/model/ICInstruction.java | 23 ++ .../debug/core/cdi/model/ICMemoryBlock.java | 77 ++++++ .../cdt/debug/core/cdi/model/ICObject.java | 37 +++ .../cdt/debug/core/cdi/model/ICRegister.java | 27 ++ .../debug/core/cdi/model/ICRegisterGroup.java | 26 ++ .../debug/core/cdi/model/ICSharedLibrary.java | 25 ++ .../debug/core/cdi/model/ICStackFrame.java | 47 ++++ .../core/cdi/model/ICStaticVariable.java | 17 ++ .../cdt/debug/core/cdi/model/ICTarget.java | 245 ++++++++++++++++++ .../cdt/debug/core/cdi/model/ICThread.java | 102 ++++++++ .../cdt/debug/core/cdi/model/ICValue.java | 44 ++++ .../cdt/debug/core/cdi/model/ICVariable.java | 68 +++++ 51 files changed, 2059 insertions(+) create mode 100644 debug/org.eclipse.cdt.debug.core/.classpath create mode 100644 debug/org.eclipse.cdt.debug.core/.project create mode 100644 debug/org.eclipse.cdt.debug.core/.template create mode 100644 debug/org.eclipse.cdt.debug.core/build.properties create mode 100644 debug/org.eclipse.cdt.debug.core/plugin.xml create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/CDIException.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICBreakpoint.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICBreakpointManager.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICCatchEvent.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICCatchpoint.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICCondition.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICEndSteppingRange.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICEventManager.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICExitInfo.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICExpressionManager.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICLocation.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICLocationBreakpoint.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICMemoryManager.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSession.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSessionObject.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSignal.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSignalManager.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSourceManager.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICWatchpoint.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICChangedEvent.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICCreatedEvent.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICDisconnectedEvent.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICEvent.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICEventListener.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICExitedEvent.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICLoadedEvent.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICRestartedEvent.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICResumedEvent.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICSteppingEvent.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICSuspendedEvent.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICTerminatedEvent.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICExpression.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICGlobalVariable.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICInstruction.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICMemoryBlock.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICObject.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICRegister.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICRegisterGroup.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICSharedLibrary.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICStackFrame.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICStaticVariable.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICTarget.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICThread.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICValue.java create mode 100644 debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICVariable.java diff --git a/debug/org.eclipse.cdt.debug.core/.classpath b/debug/org.eclipse.cdt.debug.core/.classpath new file mode 100644 index 00000000000..25ba13cc493 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + diff --git a/debug/org.eclipse.cdt.debug.core/.project b/debug/org.eclipse.cdt.debug.core/.project new file mode 100644 index 00000000000..64dcdd3eb64 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/.project @@ -0,0 +1,28 @@ + + + org.eclipse.cdt.debug.core1 + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.pde.PluginNature + + diff --git a/debug/org.eclipse.cdt.debug.core/.template b/debug/org.eclipse.cdt.debug.core/.template new file mode 100644 index 00000000000..f3bcd418c73 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/.template @@ -0,0 +1,4 @@ + +
+

Tips on working with this plug-in project

  • For the view of the new plug-in at a glance, go to the Overview.
  • You can test the contributions of this plug-in by launching another instance of the workbench. On the Run menu, click Run As and choose Run-time Workbench from the available choices.
  • You can add more functionality to this plug-in by adding extensions using the New Extension Wizard.
  • The plug-in project contains Java code that you can debug. Place breakpoints in Java classes. On the Run menu, select Debug As and choose Run-time Workbench from the available choices.
  • +
    diff --git a/debug/org.eclipse.cdt.debug.core/build.properties b/debug/org.eclipse.cdt.debug.core/build.properties new file mode 100644 index 00000000000..d30382ecd61 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/build.properties @@ -0,0 +1 @@ +source.cdebugcore.jar = src/ diff --git a/debug/org.eclipse.cdt.debug.core/plugin.xml b/debug/org.eclipse.cdt.debug.core/plugin.xml new file mode 100644 index 00000000000..9fd908c7eb1 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/plugin.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java new file mode 100644 index 00000000000..62416e40e95 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java @@ -0,0 +1,46 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core; + +import org.eclipse.core.resources.IWorkspace; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.IPluginDescriptor; +import org.eclipse.core.runtime.Plugin; + +/** + * The main plugin class to be used in the desktop. + */ +public class CDebugCorePlugin extends Plugin +{ + //The shared instance. + private static CDebugCorePlugin plugin; + + /** + * The constructor. + */ + public CDebugCorePlugin( IPluginDescriptor descriptor ) + { + super(descriptor); + plugin = this; + } + + /** + * Returns the shared instance. + */ + public static CDebugCorePlugin getDefault() + { + return plugin; + } + + /** + * Returns the workspace instance. + */ + public static IWorkspace getWorkspace() + { + return ResourcesPlugin.getWorkspace(); + } +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/CDIException.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/CDIException.java new file mode 100644 index 00000000000..95a63f2c8fd --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/CDIException.java @@ -0,0 +1,27 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; + +/** + * + * Represents a failure in the CDI model operations. + * + * @since Jul 9, 2002 + */ +public class CDIException extends CoreException +{ + /* (non-Javadoc) + * @see org.eclipse.core.runtime.CoreException#CoreException(IStatus) + */ + public CDIException( IStatus status ) + { + super( status ); + } +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICBreakpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICBreakpoint.java new file mode 100644 index 00000000000..4fa26bbc63d --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICBreakpoint.java @@ -0,0 +1,84 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi; + +/** + * + * A breakpoint is capable of suspending the execution of a program + * whenever a certain point in the program is reached. Provides a + * basic functionality for the location breakpoints, watchpoints, + * and catchpoints. + * + * @see ICLocationBreakpoint + * @see ICWatchpoint + * @see ICCatchpoint + * + * @since Jul 9, 2002 + */ +public interface ICBreakpoint extends ICSessionObject +{ + final static public int TEMPORARY = 0x1; + final static public int HARDWARE = 0x2; + + /** + * Returns whether this breakpoint is temporary. + * + * @return whether this breakpoint is temporary + */ + boolean isTemporary(); + + /** + * Returns whether this breakpoint is hardware-assisted. + * + * @return whether this breakpoint is hardware-assisted + */ + boolean isHardware(); + + /** + * Returns whether this breakpoint is enabled. + * + * @return whether this breakpoint is enabled + * @throws CDIException if this method fails. Reasons include: + */ + boolean isEnabled() throws CDIException; + + /** + * Sets the enabled state of this breakpoint. This has no effect + * if the current enabled state is the same as specified by + * the enabled parameter. + * + * @param enabled - whether this breakpoint should be enabled + * @throws CDIException if this method fails. Reasons include: + */ + void setEnabled( boolean enabled ) throws CDIException; + + /** + * Returns the condition of this breakpoint or null + * if the breakpoint's condition is not set. + * + * @return the condition of this breakpoint + * @throws CDIException if this method fails. Reasons include: + */ + ICCondition getCondition() throws CDIException; + + /** + * Sets the condition of this breakpoint. + * + * @param the condition to set + * @throws CDIException if this method fails. Reasons include: + */ + void setCondition( ICCondition condition ) throws CDIException; + + /** + * Returns a thread identifier or null is the breakpoint + * is not thread-specific. + * + * @return a thread identifier + * @throws CDIException if this method fails. Reasons include: + */ + String getThreadId() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICBreakpointManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICBreakpointManager.java new file mode 100644 index 00000000000..741e9f39981 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICBreakpointManager.java @@ -0,0 +1,107 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + */ + +package org.eclipse.cdt.debug.core.cdi; + +/** + * + * The breakpoint manager manages the collection of breakpoints + * in the debug session. + * + * @since Jul 9, 2002 + */ +public interface ICBreakpointManager extends ICSessionObject +{ + /** + * Returns a collection of all breakpoints set for this session. + * Returns an empty array if no breakpoints are set. + * + * @return a collection of all breakpoints set for this session + * @throws CDIException on failure. Reasons include: + */ + ICBreakpoint[] getBreakpoints() throws CDIException; + + /** + * Returns the breakpoint associated with the given identifier or + * null if no such breakpoint exists. + * + * @param breakpointId - the breakpoint identifier + * @return the breakpoint associated with the given identifier + * @throws CDIException on failure. Reasons include: + */ + ICBreakpoint getBreakpoint( String breakpointId ) throws CDIException; + + /** + * Deletes the given breakpoint. + * + * @param breakpoint - a breakpoint to be deleted + * @throws CDIException on failure. Reasons include: + */ + void deleteBreakpoint( ICBreakpoint breakpoint ) throws CDIException; + + /** + * Deletes the given array of breakpoints. + * + * @param breakpoints - the array of breakpoints to be deleted + * @throws CDIException on failure. Reasons include: + */ + void deleteBreakpoints( ICBreakpoint[] breakpoints ) throws CDIException; + + /** + * Deletes all breakpoints. + * + * @throws CDIException on failure. Reasons include: + */ + void deleteAllBreakpoints() throws CDIException; + + /** + * Sets a breakpoint at the given location. + * + * @param type - a combination of TEMPORARY and HARDWARE or 0 + * @param location - the location + * @param condition - the condition or null + * @param enabled - whether this breakpoint should be enabled + * @param threadId - the thread identifier if this is + * a thread-specific breakpoint or null + * @return a breakpoint + * @throws CDIException on failure. Reasons include: + */ + ICLocationBreakpoint setLocationBreakpoint( int type, + ICLocation location, + ICCondition condition, + boolean enabled, + String threadId ) throws CDIException; + + /** + * Sets a watchpoint for the given expression. + * @param type - a combination of TEMPORARY and HARDWARE or 0 + * @param watchType - a combination of READ and WRITE + * @param expression - the expression to watch + * @param condition - the condition or null + * @param enabled - whether this watchpoint should be enabled + * @return a watchpoint + * @throws CDIException on failure. Reasons include: + */ + ICWatchpoint setWatchpoint( int type, + int watchType, + String expression, + ICCondition condition, + boolean enabled ) throws CDIException; + + /** + * Sets a catchpoint for the given catch event. + * @param type - a combination of TEMPORARY and HARDWARE or 0 + * @param event - the event to catch + * @param condition - the condition or null + * @param enabled - whether this catchpoint should be enabled + * @return a catchpoint + * @throws CDIException on failure. Reasons include: + */ + ICCatchpoint setCatchpoint( int type, + ICCatchEvent event, + String expression, + ICCondition condition, + boolean enabled ) throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICCatchEvent.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICCatchEvent.java new file mode 100644 index 00000000000..4f78683a89e --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICCatchEvent.java @@ -0,0 +1,18 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi; + +/** + * + * Represents a program event supported by catchpoints. + * + * @since Jul 9, 2002 + */ +public interface ICCatchEvent +{ + +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICCatchpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICCatchpoint.java new file mode 100644 index 00000000000..0da12434668 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICCatchpoint.java @@ -0,0 +1,24 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi; + +/** + * + * Represents a catchpoint. + * + * @since Jul 9, 2002 + */ +public interface ICCatchpoint extends ICBreakpoint +{ + /** + * Returns the catch event for this catchpoint. + * + * @return the catch event for this catchpoint + * @throws CDIException if this method fails. Reasons include: + */ + ICCatchEvent getEvent() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICCondition.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICCondition.java new file mode 100644 index 00000000000..4a10d83839a --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICCondition.java @@ -0,0 +1,44 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi; + +/** + * + * Represents a break condition. + * + * @since Jul 9, 2002 + */ +public interface ICCondition +{ + /** + * Returns the condition expression. + * + * @return the condition expression + */ + String getExpression(); + + /** + * Sets the condition's expression. + * + * @param expression - an expression to set + */ + void setExpression( String expression ); + + /** + * Returns the ignore count of this condition. + * + * @return the ignore count of this condition + */ + int getIgnoreCount(); + + /** + * Sets the ignore count of this condition. + * + * @param ignoreCount - a number to set + */ + void setIgnoreCount( int ignoreCount ); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICEndSteppingRange.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICEndSteppingRange.java new file mode 100644 index 00000000000..84f991a146d --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICEndSteppingRange.java @@ -0,0 +1,17 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.core.cdi; + +/** + * + * Represents an information provided by the session when a step command + * is completed. + * + * @since Jul 10, 2002 + */ +public interface ICEndSteppingRange extends ICSessionObject +{ +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICEventManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICEventManager.java new file mode 100644 index 00000000000..0ac11337032 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICEventManager.java @@ -0,0 +1,37 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi; + +import org.eclipse.cdt.debug.core.cdi.event.ICEventListener; + +/** + * + * Clients interested in the CDI model change notification may + * register with this object. + * + * @since Jul 10, 2002 + */ +public interface ICEventManager extends ICSessionObject +{ + /** + * Adds the given listener to the collection of registered + * event listeners. Has no effect if an identical listener is + * already registered. + * + * @param listener - the listener to add + */ + void addEventListener( ICEventListener listener ); + + /** + * Removes the given listener from the collection of registered + * event listeners. Has no effect if an identical listener is not + * already registered. + * + * @param listener - the listener to remove + */ + void removeEventListener( ICEventListener listener ); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICExitInfo.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICExitInfo.java new file mode 100644 index 00000000000..3cae20b0c6f --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICExitInfo.java @@ -0,0 +1,26 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi; + +import org.eclipse.cdt.debug.core.cdi.model.ICObject; + +/** + * + * Represents an information provided by the session when the program + * exited. + * + * @since Jul 10, 2002 + */ +public interface ICExitInfo extends ICSessionObject +{ + /** + * Returns an exit code. + * + * @return an exit code + */ + int getCode(); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICExpressionManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICExpressionManager.java new file mode 100644 index 00000000000..446a351576f --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICExpressionManager.java @@ -0,0 +1,62 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + */ + +package org.eclipse.cdt.debug.core.cdi; + +import org.eclipse.cdt.debug.core.cdi.model.ICExpression; + +/** + * + * Manages the collection of registered expressions in the + * debug session. + * + * @since Jul 9, 2002 + */ +public interface ICExpressionManager extends ICSessionObject +{ + /** + * Adds the given expression to the collection of registered + * expressions. This has no effect if the given expression is + * already registered. + * + * @param expression - the expression to add + * @throws CDIException on failure. Reasons include: + */ + void addExpression( ICExpression expression ) throws CDIException; + + /** + * Removes the given array of expressions from the expression + * manager. + * + * @param expressions - the array of expressions to remove + * @throws CDIException on failure. Reasons include: + */ + void removeExpressions( ICExpression[] expressions ) throws CDIException; + + /** + * Removes the given expression from the expression manager. + * + * @param expressions - the expression to remove + * @throws CDIException on failure. Reasons include: + */ + void removeExpression( ICExpression expression ) throws CDIException; + + /** + * Returns an expression specified by the given identifier. + * + * @param expressionId - the expression identifier + * @return ICExpression an expression specified by the given identifier + * @throws CDIException on failure. Reasons include: + */ + ICExpression getExpression( String expressionId ) throws CDIException; + + /** + * Returns a collection of all registered expressions, possibly empty. + * + * @return an array of expressions + * @throws CDIException on failure. Reasons include: + */ + ICExpression[] getExpressions() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICLocation.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICLocation.java new file mode 100644 index 00000000000..0661ca9ffaa --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICLocation.java @@ -0,0 +1,71 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.core.cdi; + +import java.io.File; + +import org.eclipse.cdt.debug.core.cdi.model.ICInstruction; + +/** + * + * Represents a location in the debuggable program. + * + * @since Jul 9, 2002 + */ +public interface ICLocation +{ + /** + * Returns the address of this location. + * + * @return the address of this location + */ + long getAddress(); + + /** + * Returns the source file of this location or null + * if the source file is unknown. + * + * @return the source file of this location + */ + File getFile(); + + /** + * Returns the function of this location or null + * if the function is unknown. + * + * @return the function of this location + */ + String getFunction(); + + /** + * Returns the line number of this location or null + * if the line number is unknown. + * + * @return the line number of this location + */ + int getLineNumber(); + + /** + * Returns an array of the machine instructions of the function + * surrounding the address of this location. + * + * @return an array of the machine instructions + * @throws CDIException on failure. Reasons include: + */ + ICInstruction[] getInstructions() throws CDIException; + + /** + * Returns an array of the machine instructions of the function + * surrounding the address of this location. If the number of + * instructions is greater than maxCount the size of the returning + * array is limited by maxCount. + * + * @param maxCount - maximum number of instructions to read + * @return an array of the machine instructions + * @throws CDIException on failure. Reasons include: + */ + ICInstruction[] getInstructions( int maxCount ) throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICLocationBreakpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICLocationBreakpoint.java new file mode 100644 index 00000000000..9247a167478 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICLocationBreakpoint.java @@ -0,0 +1,24 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi; + +/** + * + * Represents a line, function or address breakpoint. + * + * @since Jul 9, 2002 + */ +public interface ICLocationBreakpoint extends ICBreakpoint +{ + /** + * Returns the location of this breakpoint. + * + * @return the location of this breakpoint + * @throws CDIException if this method fails. Reasons include: + */ + ICLocation getLocation() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICMemoryManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICMemoryManager.java new file mode 100644 index 00000000000..c2825008421 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICMemoryManager.java @@ -0,0 +1,67 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + */ + +package org.eclipse.cdt.debug.core.cdi; + +import org.eclipse.cdt.debug.core.cdi.model.ICMemoryBlock; +import org.eclipse.cdt.debug.core.cdi.model.ICTarget; + +/** + * + * The memory manager manages the collection of memory blocks + * specified for the debug session. + * + * @since Jul 9, 2002 + */ +public interface ICMemoryManager extends ICSessionObject +{ + /** + * Adds the given memory block to the debug session. + * + * @param memoryBlock - the memory block to be added + * @exception CDIException on failure. Reasons include: + */ + void addBlock( ICMemoryBlock memoryBlock ) throws CDIException; + + /** + * Removes the given memory block from the debug session. + * + * @param memoryBlock - the memory block to be removed + * @exception CDIException on failure. Reasons include: + */ + void removeBlock( ICMemoryBlock memoryBlock ); + + /** + * Removes the given array of memory blocks from the debug session. + * + * @param memoryBlock - the array of memory blocks to be removed + * @exception CDIException on failure. Reasons include: + */ + void removeBlocks( ICMemoryBlock[] memoryBlocks ) throws CDIException;; + + /** + * Removes all memory blocks from the debug session. + * + * @exception CDIException on failure. Reasons include: + */ + void removeAllBlocks() throws CDIException; + + /** + * Returns a memory block specified by given identifier. + * + * @param id - the block identifier + * @return a memory block with the specified identifier + * @throws CDIException on failure. Reasons include: + */ + ICMemoryBlock getBlock( String id ) throws CDIException; + + /** + * Returns an array of all memory blocks set for this debug session. + * + * @return an array of all memory blocks set for this debug session + * @throws CDIException on failure. Reasons include: + */ + ICMemoryBlock[] getBlocks() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSession.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSession.java new file mode 100644 index 00000000000..74a87d0f635 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSession.java @@ -0,0 +1,98 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + */ + +package org.eclipse.cdt.debug.core.cdi; + +import org.eclipse.cdt.debug.core.cdi.model.ICTarget; + +/** + * + * Represents a debug session. + * + * @since Jun 28, 2002 + */ +public interface ICSession +{ + /** + * Returns all the debug targets associatd with this sesion, + * or an empty collection if no debug targets are associated + * with this session. + * + * @return an array of debug targets + */ + ICTarget[] getTargets(); + + /** + * Sets the value of a debug session attribute. + * + * @param key the attribute key + * @param value the attribute value + */ + void setAttribute( String key, String value ); + + /** + * Returns the value of a debug session attribute. + * + * @param key the attribute key + * @return value the attribute value, or null if undefined + */ + String getAttribute( String key ); + + /** + * Returns the breakpoint manager of this debug session. + * + * @return the breakpoint manager + */ + ICBreakpointManager getBreakpointManager(); + + /** + * Returns the signal manager of this debug session. + * + * @return the signal manager + */ + ICSignalManager getSignalManager(); + + /** + * Returns the expression manager of this debug session. + * + * @return the expression manager + */ + ICExpressionManager getExpressionManager(); + + /** + * Returns the memory manager of this debug session. + * + * @return the memory manager + */ + ICMemoryManager getMemoryManager(); + + /** + * Returns the source manager of this debug session. + * + * @return the source manager + */ + ICSourceManager getSourceManager(); + + /** + * Returns the event manager of this debug session. + * + * @return the event manager + */ + ICEventManager getEventManager(); + + /** + * Returns whether this element is terminated. + * + * @return whether this element is terminated + */ + boolean isTerminated(); + + /** + * Causes this element to terminate, generating a KIND_TERMINATE event. + * + * @exception CDIException on failure. Reasons include: + */ + void terminate() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSessionObject.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSessionObject.java new file mode 100644 index 00000000000..c201c936d6b --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSessionObject.java @@ -0,0 +1,22 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.core.cdi; + +/** + * + * Represents an object associated with a debug session. + * + * @since Jul 9, 2002 + */ +public interface ICSessionObject +{ + /** + * Returns the debug session this object is associated with. + * + * @return the debug session this object is associated with + */ + ICSession getSession(); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSignal.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSignal.java new file mode 100644 index 00000000000..05729cc0bc9 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSignal.java @@ -0,0 +1,30 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi; + +/** + * + * Represents a signal. + * + * @since Jul 10, 2002 + */ +public interface ICSignal extends ICSessionObject +{ + /** + * Returns the name of this signal. + * + * @return the name of this signal + */ + String getName(); + + /** + * Returns the meaning of this signal. + * + * @return the meaning of this signal + */ + String getMeaning(); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSignalManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSignalManager.java new file mode 100644 index 00000000000..5843acb6809 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSignalManager.java @@ -0,0 +1,24 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + */ + +package org.eclipse.cdt.debug.core.cdi; + +/** + * + * The signal manager manages the collection of signals defined + * for the debug session. + * + * @since Jul 9, 2002 + */ +public interface ICSignalManager extends ICSessionObject +{ + /** + * Returns the array of signals defined for this session. + * + * @return the array of signals + * @throws CDIException on failure. Reasons include: + */ + ICSignal[] getSignals() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSourceManager.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSourceManager.java new file mode 100644 index 00000000000..221d33bee43 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICSourceManager.java @@ -0,0 +1,41 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + */ + +package org.eclipse.cdt.debug.core.cdi; + +import java.io.File; + +/** + * + * Maintains the list of directories to search for source files. + * + * @since Jul 9, 2002 + */ +public interface ICSourceManager extends ICSessionObject +{ + /** + * Returns an array of directories. Returns the empty array + * if the source path is empty. + * + * @return an array of directories + * @throws CDIException on failure. Reasons include: + */ + File[] getDirectories() throws CDIException; + + /** + * Sets the source path according to the given array of directories. + * + * @param directories - the array of directories + * @throws CDIException on failure. Reasons include: + */ + void set( File[] directories ) throws CDIException; + + /** + * Reset the source path to empty. + * + * @throws CDIException on failure. Reasons include: + */ + void reset() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICWatchpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICWatchpoint.java new file mode 100644 index 00000000000..5ae19a42abc --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/ICWatchpoint.java @@ -0,0 +1,41 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi; + +/** + * + * Represents a watchpoint. + * + * @since Jul 9, 2002 + */ +public interface ICWatchpoint extends ICBreakpoint +{ + final static public int WRITE = 0x1; + final static public int READ = 0x2; + + /** + * Returns whether this watchppoint is a write watchpoint. + * + * @return whether this watchppoint is a write watchpoint + */ + boolean isWriteType(); + + /** + * Returns whether this watchppoint is a read watchpoint. + * + * @return whether this watchppoint is a read watchpoint + */ + boolean isReadType(); + + /** + * Returns the watchpoint's expression. + * + * @return the expression of this watchpoint + * @throws CDIException if this method fails. Reasons include: + */ + String getWatchExpression() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICChangedEvent.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICChangedEvent.java new file mode 100644 index 00000000000..722bf45aaae --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICChangedEvent.java @@ -0,0 +1,17 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.core.cdi.event; + +/** + * + * Notifies that the originator has changed. + * Can be originated by any CDI model object. + * + * @since Jul 10, 2002 + */ +public interface ICChangedEvent extends ICEvent +{ +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICCreatedEvent.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICCreatedEvent.java new file mode 100644 index 00000000000..4d5a8985fa2 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICCreatedEvent.java @@ -0,0 +1,22 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.event; + +/** + * + * Notifies that the originator has been created. + * The originators: + * + * + * @since Jul 10, 2002 + */ +public interface ICCreatedEvent extends ICEvent +{ +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICDisconnectedEvent.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICDisconnectedEvent.java new file mode 100644 index 00000000000..7d707d8e185 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICDisconnectedEvent.java @@ -0,0 +1,21 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.event; + +/** + * + * Notifies that the originator has disconnected. + * The originators: + * + * + * @since Jul 10, 2002 + */ +public interface ICDisconnectedEvent extends ICEvent +{ +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICEvent.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICEvent.java new file mode 100644 index 00000000000..b2018746552 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICEvent.java @@ -0,0 +1,25 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.event; + +import org.eclipse.cdt.debug.core.cdi.model.ICObject; + +/** + * + * A base interface for all CDI events. + * + * @since Jul 18, 2002 + */ +public interface ICEvent +{ + /** + * The CDI object on which the event initially occurred. + * + * @return the CDI object on which the event initially occurred + */ + ICObject getSource(); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICEventListener.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICEventListener.java new file mode 100644 index 00000000000..48a2199fead --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICEventListener.java @@ -0,0 +1,24 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.event; + +/** + * + * An event listener registers with the event manager to receive event + * notification from the CDI model objects. + * + * @since Jul 10, 2002 + */ +public interface ICEventListener +{ + /** + * Notifies this listener of the given event. + * + * @param event - the event + */ + void handleDebugEvent( ICEvent event ); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICExitedEvent.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICExitedEvent.java new file mode 100644 index 00000000000..71e85fd83bd --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICExitedEvent.java @@ -0,0 +1,29 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.core.cdi.event; + +import org.eclipse.cdt.debug.core.cdi.ICExitInfo; + +/** + * + * Notifies that the program has exited. + * The originators: + * + * + * @since Jul 10, 2002 + */ +public interface ICExitedEvent extends ICEvent +{ + /** + * Returns the information provided by the session when program + * is exited. + * + * @return the exit information + */ + ICExitInfo getExitInfo(); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICLoadedEvent.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICLoadedEvent.java new file mode 100644 index 00000000000..2ce0e69a134 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICLoadedEvent.java @@ -0,0 +1,21 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.event; + +/** + * + * Notifies that the originator has been restarted. + * The originators: + * + * + * @since Jul 11, 2002 + */ +public interface ICLoadedEvent extends ICEvent +{ +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICRestartedEvent.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICRestartedEvent.java new file mode 100644 index 00000000000..83958ae293a --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICRestartedEvent.java @@ -0,0 +1,21 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.event; + +/** + * + * Notifies that the originator has been restarted. + * The originators: + * + * + * @since Jul 11, 2002 + */ +public interface ICRestartedEvent extends ICEvent +{ +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICResumedEvent.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICResumedEvent.java new file mode 100644 index 00000000000..00397926fa5 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICResumedEvent.java @@ -0,0 +1,21 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.core.cdi.event; + +/** + * + * Notifies that the originator has been resumed. + * The originators: + * + * + * @since Jul 10, 2002 + */ +public interface ICResumedEvent extends ICEvent +{ +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICSteppingEvent.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICSteppingEvent.java new file mode 100644 index 00000000000..f6bd6f3ad2e --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICSteppingEvent.java @@ -0,0 +1,29 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.core.cdi.event; + +/** + * + * Can be originated by an ICThread object when the thread is + * being resumed by a request to step. + * + * @since Jul 10, 2002 + */ +public interface ICSteppingEvent extends ICEvent +{ + final static public int STEP_OVER = 0; + final static public int STEP_INTO = 1; + final static public int STEP_OVER_INSTRUCTION = 2; + final static public int STEP_INTO_INSTRUCTION = 3; + final static public int STEP_RETURN = 4; + + /** + * Returns the stepping type. + * + * @return the stepping type + */ + int getType(); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICSuspendedEvent.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICSuspendedEvent.java new file mode 100644 index 00000000000..64f757bc09d --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICSuspendedEvent.java @@ -0,0 +1,45 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.event; + +import org.eclipse.cdt.debug.core.cdi.ICSessionObject; +import org.eclipse.cdt.debug.core.cdi.model.ICStackFrame; + +/** + * + * Notifies that the originator has been suspended. + * The originators: + * + * The reason of the suspension can be one of the following session + * objects: + * + * + * @since Jul 10, 2002 + */ +public interface ICSuspendedEvent extends ICEvent +{ + /** + * Returns the session object that caused the suspension. + * + * @return ICObject + */ + ICSessionObject getReason(); + + /** + * Returns the current stack frame. + * + * @return the current stack frame + */ + ICStackFrame getStackFrame(); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICTerminatedEvent.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICTerminatedEvent.java new file mode 100644 index 00000000000..8c17c1c6300 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/event/ICTerminatedEvent.java @@ -0,0 +1,21 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.core.cdi.event; + +/** + * + * Notifies that the originator has terminated. + * The originators: + * + * + * @since Jul 10, 2002 + */ +public interface ICTerminatedEvent extends ICEvent +{ +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICExpression.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICExpression.java new file mode 100644 index 00000000000..2bc205d6a0f --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICExpression.java @@ -0,0 +1,34 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.model; + +import org.eclipse.cdt.debug.core.cdi.CDIException; + +/** + * An expression is a snippet of code that can be evaluated to + * produce a value. + * + * @since Jul 9, 2002 + */ +public interface ICExpression extends ICObject +{ + /** + * Returns this expression's snippet of code. + * + * @return the expression + */ + String getExpressionText(); + + /** + * Returns the current value of this expression or null + * if this expression does not currently have a value. + * + * @return the current value of this expression + * @throws CDIException if this method fails. Reasons include: + */ + ICValue getValue() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICGlobalVariable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICGlobalVariable.java new file mode 100644 index 00000000000..9b03c911a46 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICGlobalVariable.java @@ -0,0 +1,17 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.model; + +/** + * + * Represents a global data structure in the program. + * + * @since Jul 9, 2002 + */ +public interface ICGlobalVariable extends ICVariable +{ +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICInstruction.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICInstruction.java new file mode 100644 index 00000000000..b8eb04cdf14 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICInstruction.java @@ -0,0 +1,23 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.model; + +/** + * + * Represents a machine instruction. + * + * @since Jul 10, 2002 + */ +public interface ICInstruction extends ICObject +{ + /** + * Returns the instruction's offset. + * + * @return the offset of this machine instruction + */ + long getOffset(); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICMemoryBlock.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICMemoryBlock.java new file mode 100644 index 00000000000..a7f512eb6cf --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICMemoryBlock.java @@ -0,0 +1,77 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.model; + +import org.eclipse.cdt.debug.core.cdi.CDIException; + +/** + * + * A contiguos segment of memory in an execution context. A memory + * block is represented by a starting memory address and a length. + * + * @since Jul 18, 2002 + */ +public interface ICMemoryBlock extends ICObject +{ + /** + * Returns the start address of this memory block. + * + * @return the start address of this memory block + */ + long getStartAddress(); + + /** + * Returns the length of this memory block in bytes. + * + * @return the length of this memory block in bytes + */ + long getLength(); + + /** + * Returns the values of the bytes currently contained + * in this this memory block. + * + * @return the values of the bytes currently contained + * in this this memory block + * @exception CDIException if this method fails. Reasons include: + * + */ + byte[] getBytes() throws CDIException; + + /** + * Returns whether this memory block supports value modification + * + * @return whether this memory block supports value modification + */ + boolean supportsValueModification(); + + /** + * Sets the value of the bytes in this memory block at the specified + * offset within this memory block to the spcified bytes. + * The offset is zero based. + * + * @param offset the offset at which to set the new values + * @param bytes the new values + * @exception CDIException if this method fails. Reasons include: + * + */ + void setValue( long offset, byte[] bytes ) throws CDIException; + + boolean isFreezed(); + + void setFreezed( boolean freezed ); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICObject.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICObject.java new file mode 100644 index 00000000000..5ce20707e82 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICObject.java @@ -0,0 +1,37 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + */ + +package org.eclipse.cdt.debug.core.cdi.model; + +/** + * + * Represents an object in the CDI model. + * + * @since Jul 8, 2002 + */ +public interface ICObject +{ + /** + * Returns the identifier of this object. + * + * @return the identifier of this object + */ + String getId(); + + /** + * Returns the target this object is contained in. + * + * @return the target this object is contained in + */ + ICTarget getCDITarget(); + + /** + * Returns the parent of this object or null if this + * object is a top level object. + * + * @return the parent of this object + */ + ICObject getParent(); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICRegister.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICRegister.java new file mode 100644 index 00000000000..18e4a10ff5f --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICRegister.java @@ -0,0 +1,27 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.model; + +import org.eclipse.cdt.debug.core.cdi.CDIException; + +/** + * + * A register is a special kind of variable that is contained + * in a register group. Each register has a name and a value. + * + * @since Jul 9, 2002 + */ +public interface ICRegister extends ICVariable +{ + /** + * Returns the register group this register is contained in. + * + * @return the register group this register is contained in + * @exception CDIException if this method fails. Reasons include: + */ + ICRegisterGroup getRegisterGroup() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICRegisterGroup.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICRegisterGroup.java new file mode 100644 index 00000000000..6ebf3ee9fe0 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICRegisterGroup.java @@ -0,0 +1,26 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.model; + +import org.eclipse.cdt.debug.core.cdi.CDIException; + +/** + * + * Represents a group of registers that are assigned to a target. + * + * @since Jul 9, 2002 + */ +public interface ICRegisterGroup extends ICObject +{ + /** + * Returns the registers in this register group. + * + * @return the registers in this register group + * @throws CDIException if this method fails. Reasons include: + */ + ICRegister[] getRegisters() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICSharedLibrary.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICSharedLibrary.java new file mode 100644 index 00000000000..f3eadb3f021 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICSharedLibrary.java @@ -0,0 +1,25 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ +package org.eclipse.cdt.debug.core.cdi.model; + +import java.io.File; + +/** + * + * Represents a shared library which has been loaded into + * the debug target. + * + * @since Jul 8, 2002 + */ +public interface ICSharedLibrary extends ICObject +{ + /** + * Returns the shared library file. + * + * @return the shared library file + */ + File getFile(); +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICStackFrame.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICStackFrame.java new file mode 100644 index 00000000000..76a4c51fdcf --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICStackFrame.java @@ -0,0 +1,47 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.model; + +import org.eclipse.cdt.debug.core.cdi.CDIException; +import org.eclipse.cdt.debug.core.cdi.ICLocation; + +/** + * + * A stack frame in a suspended thread. + * A stack frame contains variables representing visible locals and + * arguments at the current execution location. + * + * @since Jul 8, 2002 + */ +public interface ICStackFrame extends ICObject +{ + /** + * Returns the location of the instruction pointer in this + * stack frame. + * + * @return the location of the instruction pointer + */ + ICLocation getLocation(); + + /** + * Returns the visible variables in this stack frame. An empty + * collection is returned if there are no visible variables. + * + * @return a collection of visible variables + * @throws CDIException if this method fails. Reasons include: + */ + ICVariable[] getLocalVariables() throws CDIException; + + /** + * Returns the arguments in this stack frame. An empty collection + * is returned if there are no arguments. + * + * @return a collection of arguments + * @throws CDIException if this method fails. Reasons include: + */ + ICVariable[] getArguments() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICStaticVariable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICStaticVariable.java new file mode 100644 index 00000000000..98fc3bc5ec8 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICStaticVariable.java @@ -0,0 +1,17 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.model; + +/** + * + * Represents a static data structure in the program. + * + * @since Jul 9, 2002 + */ +public interface ICStaticVariable extends ICVariable +{ +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICTarget.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICTarget.java new file mode 100644 index 00000000000..f2add9d32d8 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICTarget.java @@ -0,0 +1,245 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.model; + +import java.io.InputStream; +import java.io.OutputStream; + +import org.eclipse.cdt.debug.core.cdi.CDIException; +import org.eclipse.cdt.debug.core.cdi.ICSession; + +/** + * + * Represents a debuggable process. This is a root object of the CDI + * model. + * + * @since Jul 8, 2002 + */ +public interface ICTarget extends ICObject +{ + /** + * Returns the debug session this target is contained in. + * + * @return the debug session this target is contained in + */ + ICSession getSession(); + + /** + * Gets the output stream of the target process. + * + * @return the output stream connected to the normal input of the + * target process. + */ + OutputStream getOutputStream(); + + /** + * Gets the input stream of the target process. + * + * @return the input stream connected to the normal output of the + * target process. + */ + InputStream getInputStream(); + + /** + * Gets the error stream of the target process. + * + * @return the input stream connected to the error stream of the + * target process. + */ + InputStream getErrorStream(); + + /** + * Returns the system process associated with this target. + * + * @return the system process associated with this target + * @throws CDIException if this method fails. Reasons include: + */ + Process getProcess() throws CDIException; + + /** + * Returns the shared libraries loaded in this target. + * An empty collection is returned if no shared libraries + * are loaded in this target. + * + * @return a collection of shared libraries + * @throws CDIException if this method fails. Reasons include: + */ + ICSharedLibrary[] getSharedLibraries() throws CDIException; + + /** + * Returns the threads contained in this target. + * An empty collection is returned if this target contains no + * threads. + * + * @return a collection of threads + * @throws CDIException if this method fails. Reasons include: + */ + ICThread[] getThreads() throws CDIException; + + /** + * Returns the thread associated with the given id. + * + * @param id - the thread id + * @return the thread associated with the given id + * @throws CDIException if this method fails. Reasons include: + */ + ICThread getThread( String id ) throws CDIException; + + /** + * Returns a memory block that starts at the specified memory + * address, with the specified length. + * + * @param - starting address + * @param - length of the memory block in bytes + * @return a memory block that starts at the specified memory address, + * with the specified length + * @throws CDIException if this method fails. Reasons include: + */ + ICMemoryBlock getCMemoryBlock( long startAddress, long length ) throws CDIException; + + /** + * Returns the register groups associated with this target. + * + * @return a collection of register groups + * @throws CDIException if this method fails. Reasons include: + */ + ICRegisterGroup[] getRegisterGroups() throws CDIException; + + /** + * Returns a collection of global variables associated with + * this target. + * + * @return a collection of global variables + * @throws CDIException if this method fails. Reasons include: + */ + ICGlobalVariable[] getGlobalVariables() throws CDIException; + + /** + * Evaluates the expression specified by the given string. + * + * @param - expression string to be evaluated + * @return an expression object + * @throws CDIException if this method fails. Reasons include: + */ + ICExpression evaluateExpression( String expressionText ) throws CDIException; + + /** + * Evaluates the given expression. + * + * @param - expression to be evaluated + * @throws CDIException if this method fails. Reasons include: + */ + void evaluateExpression( ICExpression expression ) throws CDIException; + + /** + * Returns whether this target is terminated. + * + * @return whether this target is terminated + */ + boolean isTerminated(); + + /** + * Causes this target to terminate. + * + * @throws CDIException if this method fails. Reasons include: + */ + void terminate() throws CDIException; + + /** + * Returns whether this target is disconnected. + * + * @return whether this target is disconnected + */ + boolean isDisconnected(); + + /** + * Disconnects this target from the debuggable process. Generally, + * disconnecting ends a debug session with this target, but allows + * the debuggable program to continue running. + * + * @throws CDIException if this method fails. Reasons include: + */ + void disconnect() throws CDIException; + + /** + * Restarts the execution of this target. + * + * @throws CDIException if this method fails. Reasons include: + */ + void restart() throws CDIException; + + /** + * Returns whether this target is currently suspended. + * + * @return whether this target is currently suspended + */ + boolean isSuspended(); + + /** + * Causes this target to resume its execution. + * Has no effect on a target that is not suspended. + * + * @throws CDIException if this method fails. Reasons include: + */ + void resume() throws CDIException; + + /** + * Causes this target to suspend its execution. + * Has no effect on an already suspended target. + * + * @throws CDIException if this method fails. Reasons include: + */ + void suspend() throws CDIException; + + /** + * Returns whether this target is is currently stepping. + * + * @return whether this target is currently stepping + */ + boolean isStepping(); + + /** + * Steps over the current source line. Can only be called + * when the associated target is suspended. + * + * @throws CDIException if this method fails. Reasons include: + */ + void stepOver() throws CDIException; + + /** + * Steps into the current source line. Can only be called + * when the associated target is suspended. + * + * @throws CDIException if this method fails. Reasons include: + */ + void stepInto() throws CDIException; + + /** + * Steps over the current machine instruction. Can only be called + * when the associated target is suspended. + * + * @throws CDIException if this method fails. Reasons include: + */ + void stepOverInstruction() throws CDIException; + + /** + * Steps into the current machine instruction. Can only be called + * when the associated target is suspended. + * + * @throws CDIException if this method fails. Reasons include: + */ + void stepIntoInstruction() throws CDIException; + + /** + * Continues running until just after function in the current + * stack frame returns. Can only be called when the associated + * target is suspended. + * + * @throws CDIException if this method fails. Reasons include: + */ + void finish() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICThread.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICThread.java new file mode 100644 index 00000000000..c1e61e7fb50 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICThread.java @@ -0,0 +1,102 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.model; + +import org.eclipse.cdt.debug.core.cdi.CDIException; + +/** + * + * A thread in a debug target. + * A thread contains stack frames. Stack frames are only available + * when the thread is suspended, and are returned in top-down order. + * + * @since Jul 8, 2002 + */ +public interface ICThread extends ICObject +{ + /** + * Returns the stack frames contained in this thread. An + * empty collection is returned if this thread contains + * no stack frames, or is not currently suspended. Stack frames + * are returned in top down order. + * + * @return a collection of stack frames + * @throws CDIException if this method fails. Reasons include: + */ + ICStackFrame[] getStackFrames() throws CDIException; + + /** + * Returns whether this thread is currently suspended. + * + * @return whether this thread is currently suspended + */ + boolean isSuspended(); + + /** + * Causes this thread to resume its execution. + * Has no effect on a thread that is not suspended. + * + * @throws CDIException if this method fails. Reasons include: + */ + void resume() throws CDIException; + + /** + * Causes this thread to suspend its execution. + * Has no effect on an already suspended thread. + * + * @throws CDIException if this method fails. Reasons include: + */ + void suspend() throws CDIException; + + /** + * Returns whether this thread is is currently stepping. + * + * @return whether this thread is currently stepping + */ + boolean isStepping(); + + /** + * Steps over the current source line. Can only be called + * when the associated thread is suspended. + * + * @throws CDIException if this method fails. Reasons include: + */ + void stepOver() throws CDIException; + + /** + * Steps into the current source line. Can only be called + * when the associated thread is suspended. + * + * @throws CDIException if this method fails. Reasons include: + */ + void stepInto() throws CDIException; + + /** + * Steps over the current machine instruction. Can only be called + * when the associated thread is suspended. + * + * @throws CDIException if this method fails. Reasons include: + */ + void stepOverInstruction() throws CDIException; + + /** + * Steps into the current machine instruction. Can only be called + * when the associated thread is suspended. + * + * @throws CDIException if this method fails. Reasons include: + */ + void stepIntoInstruction() throws CDIException; + + /** + * Continues running until just after function in the current + * stack frame returns. Can only be called when the associated + * thread is suspended. + * + * @throws CDIException if this method fails. Reasons include: + */ + void finish() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICValue.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICValue.java new file mode 100644 index 00000000000..16950af3cf1 --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICValue.java @@ -0,0 +1,44 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.model; + +import org.eclipse.cdt.debug.core.cdi.CDIException; + +/** + * + * Represents the value of a variable. A value representing + * a complex data structure contains variables. + * + * @since Jul 9, 2002 + */ +public interface ICValue extends ICObject +{ + /** + * Returns a description of the type of data this value contains. + * + * @return the name of this value's data type + * @throws CDIException if this method fails. Reasons include: + */ + String getTypeName() throws CDIException; + + /** + * Returns this value as a String. + * + * @return a String representation of this value + * @throws CDIException if this method fails. Reasons include: + */ + String getValueString() throws CDIException; + + /** + * Returns the variables in this value. An empty collection + * is returned if there are no variables. + * + * @return an array of variables + * @throws CDIException if this method fails. Reasons include: + */ + ICVariable[] getVariables() throws CDIException; +} diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICVariable.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICVariable.java new file mode 100644 index 00000000000..75e0f1b61bb --- /dev/null +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/cdi/model/ICVariable.java @@ -0,0 +1,68 @@ +/* + *(c) Copyright QNX Software Systems Ltd. 2002. + * All Rights Reserved. + * + */ + +package org.eclipse.cdt.debug.core.cdi.model; + +import org.eclipse.cdt.debug.core.cdi.CDIException; + +/** + * + * Represents a data structure in the program. Each variable has + * a value which may in turn contain more variables. + * + * @since Jul 9, 2002 + */ +public interface ICVariable extends ICObject +{ + /** + * Returns the name of this variable. + * + * @return the name of this variable + * @throws CDIException if this method fails. Reasons include: + */ + String getName() throws CDIException; + + /** + * Returns the type of data this variable is declared. + * + * @return the type of data this variable is declared + * @throws CDIException if this method fails. Reasons include: + */ + String getTypeName() throws CDIException; + + /** + * Returns the value of this variable. + * + * @return the value of this variable + * @throws CDIException if this method fails. Reasons include: + */ + ICValue getValue() throws CDIException; + + /** + * Returns whether this variable's value has changed since the last suspend event. + * + * @return whether this variable's value has changed since the last suspend event + * @throws CDIException if this method fails. Reasons include: + */ + boolean hasValueChanged() throws CDIException; + + /** + * Attempts to set the value of this variable to the value of + * the given expression. + * + * @param expression - an expression to generate a new value + * @throws CDIException if this method fails. Reasons include: + */ + void setValue( String expression ) throws CDIException; + + /** + * Sets the value of this variable to the given value. + * + * @param value - a new value + * @throws CDIException if this method fails. Reasons include: + */ + void setValue( ICValue value ) throws CDIException; +}