diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICEventBreakpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICEventBreakpoint.java index ffabf8294fa..a664003eb86 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICEventBreakpoint.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/model/ICEventBreakpoint.java @@ -19,35 +19,161 @@ import org.eclipse.core.runtime.CoreException; * is break on raising exception in C++, or break on receiving signal. * * @sinse 5.0 + * @since 7.0 */ public interface ICEventBreakpoint extends ICBreakpoint { /** - * Breakpoint attribute storing the event breakpoint event id + * Breakpoint attribute storing the event breakpoint event id. Basically, + * this indicates what type of event the breakpoint catches--e.g., a C++ + * exception throw, a library load, a thread exit, etc. Event types can be + * contributed via the "breakpointContribution" extension point. Stock CDT + * contributes a number of them, which are represented here by the + * EVENT_TYPE_XXXXX constants + * + *
* This attribute is a String
.
*
*/
- public static final String EVENT_TYPE_ID = "org.eclipse.cdt.debug.core.eventbreakpoint_event_id"; //$NON-NLS-1$
+ public static final String EVENT_TYPE_ID = "org.eclipse.cdt.debug.core.eventbreakpoint_event_id"; //$NON-NLS-1$
+
/**
- * Breakpoint attribute storing the event breakpoint argument
- * This attribute is a String
.
+ * An event breakpoint of this type suspends the target program when it
+ * catches a C++ exception. This type of event has no parameters.
*
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_CATCH = "org.eclipse.cdt.debug.gdb.catch"; //$NON-NLS-1$
+
+ /**
+ * An event breakpoint of this type suspends the target program when it
+ * throws a C++ exception. This type of event has no parameters.
+ *
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_THROW = "org.eclipse.cdt.debug.gdb.throw"; //$NON-NLS-1$
+
+ /**
+ * An event breakpoint of this type suspends the target program when it
+ * catches a signal (POSIX). This type of event has a single parameter of
+ * type in, indicating the specific signal.
+ *
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_SIGNAL_CATCH = "org.eclipse.cdt.debug.gdb.signal"; //$NON-NLS-1$
+
+ /**
+ * An event breakpoint of this type suspends the target program when it
+ * calls fork() (POSIX). This type of event has no parameters.
+ *
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_FORK = "org.eclipse.cdt.debug.gdb.catch_fork"; //$NON-NLS-1$
+
+ /**
+ * An event breakpoint of this type suspends the target program when it
+ * calls vfork() (POSIX). This type of event has no parameters.
+ *
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_VFORK = "org.eclipse.cdt.debug.gdb.catch_vfork"; //$NON-NLS-1$
+
+ /**
+ * An event breakpoint of this type suspends the target program when it
+ * calls exec() (POSIX). This type of event has no parameters.
+ *
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_EXEC = "org.eclipse.cdt.debug.gdb.catch_exec"; //$NON-NLS-1$
+
+ /**
+ * An event breakpoint of this type suspends the target program when it
+ * calls exit() (POSIX). This type of event has no parameters.
+ *
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_EXIT = "org.eclipse.cdt.debug.gdb.catch_exit"; //$NON-NLS-1$
+
+ /**
+ * An event breakpoint of this type suspends the target program when a new
+ * process starts. This type of event has no parameters.
+ *
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_PROCESS_START = "org.eclipse.cdt.debug.gdb.catch_start"; //$NON-NLS-1$
+
+ /**
+ * An event breakpoint of this type suspends the target program when a
+ * process exits. This type of event has no parameters.
+ *
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_PROCESS_STOP = "org.eclipse.cdt.debug.gdb.catch_stop"; //$NON-NLS-1$
+
+ /**
+ * An event breakpoint of this type suspends the target program when a new
+ * thread starts. This type of event has no parameters.
+ *
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_THREAD_START = "org.eclipse.cdt.debug.gdb.catch_thread_start"; //$NON-NLS-1$
+
+ /**
+ * An event breakpoint of this type suspends the target program when a
+ * thread exits. This type of event has no parameters.
+ *
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_THREAD_EXIT = "org.eclipse.cdt.debug.gdb.catch_thread_exit"; //$NON-NLS-1$
+
+ /**
+ * An event breakpoint of this type suspends the target program when a
+ * thread joins another one (waits for it to exit) This type of event has no
+ * parameters.
+ *
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_THREAD_JOIN = "org.eclipse.cdt.debug.gdb.catch_thread_join"; //$NON-NLS-1$
+
+ /**
+ * An event breakpoint of this type suspends the target program when it
+ * loads a library. This type of event has no parameters.
+ *
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_LIBRARY_LOAD = "org.eclipse.cdt.debug.gdb.catch_load"; //$NON-NLS-1$
+
+ /**
+ * An event breakpoint of this type suspends the target program when it
+ * unloads a library. This type of event has no parameters.
+ *
+ * @since 7.0
+ */
+ public static final String EVENT_TYPE_LIBRARY_UNLOAD = "org.eclipse.cdt.debug.gdb.catch_unload"; //$NON-NLS-1$
+
+ /**
+ * Breakpoint attribute storing the event breakpoint argument. This
+ * attribute is a String
, though it may be a stringified
+ * representation of another type (it may be a number, for example).
+ * Currently, an event type can have only one argument
*/
public static final String EVENT_ARG = "org.eclipse.cdt.debug.core.eventbreakpoint_event_arg"; //$NON-NLS-1$
-
+
/**
- * Get event breakpoint type. This is usually id in reverse web notation.
- * This type is interpreted by underlying debugger implementation.
- * Use extension point org.eclipse.cdt.debug.ui.breakpointContribution
to define user visible label for this event type.
+ * Get the event breakpoint type. One of our EVENT_TYPE_XXXXX constants or a
+ * custom type contributed via the breakpointContribution
+ * extension point
+ *
* @return event breakpoint type id (not null)
- * @throws CoreException
+ * @throws CoreException
*/
String getEventType() throws CoreException;
/**
- * Get extra event argument. For example name of the exception or number of a signal.
- * Use extension point org.eclipse.cdt.debug.ui.breakpointContribution
to define UI control to edit/view this argument
- * @return event argument (not null)
- * @throws CoreException
+ * Get the event argument, if the type has one. Currently, an event type can
+ * have at most one argument.
+ *
+ * @return event argument, or null if not applicable
+ * @throws CoreException
*/
String getEventArgument() throws CoreException;
}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF
index 42799b8dd2b..f3ee08098da 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF
+++ b/debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.debug.mi.core; singleton:=true
-Bundle-Version: 6.1.0.qualifier
+Bundle-Version: 7.0.0.qualifier
Bundle-Activator: org.eclipse.cdt.debug.mi.core.MIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventBreakpointHit.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventBreakpointHit.java
index 584aea7b474..a7fc6839bcd 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventBreakpointHit.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventBreakpointHit.java
@@ -14,7 +14,7 @@ import org.eclipse.cdt.debug.core.cdi.ICDIEventBreakpointHit;
import org.eclipse.cdt.debug.mi.core.event.MICatchpointHitEvent;
/**
- * @since 6.1
+ * @since 7.0
*/
public class EventBreakpointHit extends SessionObject implements ICDIEventBreakpointHit {
diff --git a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java
index 03d4c5c21d3..6850c1a0c32 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java
@@ -12,10 +12,12 @@ package org.eclipse.cdt.debug.mi.core.cdi.model;
import java.util.Arrays;
import java.util.HashMap;
+import java.util.Map;
import org.eclipse.cdt.debug.core.cdi.ICDICondition;
import org.eclipse.cdt.debug.core.cdi.model.ICDIEventBreakpoint;
import org.eclipse.cdt.debug.core.model.ICBreakpointType;
+import org.eclipse.cdt.debug.core.model.ICEventBreakpoint;
import org.eclipse.cdt.debug.mi.core.output.MIBreakpoint;
/**
@@ -23,71 +25,38 @@ import org.eclipse.cdt.debug.mi.core.output.MIBreakpoint;
*/
public class EventBreakpoint extends Breakpoint implements ICDIEventBreakpoint {
- public static final String CATCH = "org.eclipse.cdt.debug.gdb.catch";
- public static final String THROW = "org.eclipse.cdt.debug.gdb.throw";
- public static final String SIGNAL_CATCH = "org.eclipse.cdt.debug.gdb.signal";
- public static final String STOP_ON_FORK = "org.eclipse.cdt.debug.gdb.catch_fork";
- public static final String STOP_ON_VFORK = "org.eclipse.cdt.debug.gdb.catch_vfork";
- public static final String STOP_ON_EXEC = "org.eclipse.cdt.debug.gdb.catch_exec";
- /**
- * @since 6.0
- */
- public static final String CATCH_EXIT = "org.eclipse.cdt.debug.gdb.catch_exit";
- /**
- * @since 6.0
- */
- public static final String CATCH_START = "org.eclipse.cdt.debug.gdb.catch_start";
- /**
- * @since 6.0
- */
- public static final String CATCH_STOP = "org.eclipse.cdt.debug.gdb.catch_stop";
- /**
- * @since 6.0
- */
- public static final String CATCH_THREAD_START = "org.eclipse.cdt.debug.gdb.catch_thread_start";
- /**
- * @since 6.0
- */
- public static final String CATCH_THREAD_EXIT = "org.eclipse.cdt.debug.gdb.catch_thread_exit";
- /**
- * @since 6.0
- */
- public static final String CATCH_THREAD_JOIN = "org.eclipse.cdt.debug.gdb.catch_thread_join";
- /**
- * @since 6.0
- */
- public static final String CATCH_LOAD = "org.eclipse.cdt.debug.gdb.catch_load";
- /**
- * @since 6.0
- */
- public static final String CATCH_UNLOAD = "org.eclipse.cdt.debug.gdb.catch_unload";
private String eventType;
private String arg;
- private static final HashMap