Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Cortell2010-03-12 23:36:43 +0000
committerJohn Cortell2010-03-12 23:36:43 +0000
commit9146796fd600089ddaf33d290a0e14a7904da125 (patch)
tree8aa789c46330f77f5990f309fc3cdaba99898cdb /debug/org.eclipse.cdt.debug.mi.core
parentcde61d654485d0f9e8568a5c89d3609fdda08195 (diff)
downloadorg.eclipse.cdt-9146796fd600089ddaf33d290a0e14a7904da125.tar.gz
org.eclipse.cdt-9146796fd600089ddaf33d290a0e14a7904da125.tar.xz
org.eclipse.cdt-9146796fd600089ddaf33d290a0e14a7904da125.zip
[305752] Constants for standard event breakpoint types should be outside the CDI-GDB plugin
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.core')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/META-INF/MANIFEST.MF2
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/EventBreakpointHit.java2
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/cdi/org/eclipse/cdt/debug/mi/core/cdi/model/EventBreakpoint.java95
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/ErrorThread.java2
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MICatchpointHitEvent.java2
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java2
6 files changed, 37 insertions, 68 deletions
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<String, String> idToKeyword = new HashMap<String, String>();
+
+ /**
+ * A mapping of ICEventBreakpoint event types to their corresponding gdb
+ * catchpoint keyword
+ */
+ private static final Map<String, String> idToKeyword = new HashMap<String, String>();
static {
// these Ids are also referenced in mi.ui plugin as contribution
// to event breakpoints selector
- idToKeyword.put(CATCH, "catch");
- idToKeyword.put(THROW, "throw");
- idToKeyword.put(SIGNAL_CATCH, "signal");
- idToKeyword.put(STOP_ON_EXEC, "exec");
- idToKeyword.put(STOP_ON_FORK, "fork");
- idToKeyword.put(STOP_ON_VFORK, "vfork");
- idToKeyword.put(CATCH_EXIT, "exit");
- idToKeyword.put(CATCH_START, "start");
- idToKeyword.put(CATCH_STOP, "stop");
- idToKeyword.put(CATCH_THREAD_START, "thread_start");
- idToKeyword.put(CATCH_THREAD_EXIT, "thread_exit");
- idToKeyword.put(CATCH_THREAD_JOIN, "thread_join");
- idToKeyword.put(CATCH_LOAD, "load");
- idToKeyword.put(CATCH_UNLOAD, "unload");
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_CATCH, "catch"); //$NON-NLS-1$
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_THROW, "throw"); //$NON-NLS-1$
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_SIGNAL_CATCH, "signal"); //$NON-NLS-1$
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_EXEC, "exec"); //$NON-NLS-1$
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_FORK, "fork"); //$NON-NLS-1$
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_VFORK, "vfork"); //$NON-NLS-1$
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_EXIT, "exit"); //$NON-NLS-1$
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_PROCESS_START, "start"); //$NON-NLS-1$
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_PROCESS_STOP, "stop"); //$NON-NLS-1$
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_THREAD_START, "thread_start"); //$NON-NLS-1$
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_THREAD_EXIT, "thread_exit"); //$NON-NLS-1$
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_THREAD_JOIN, "thread_join"); //$NON-NLS-1$
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_LIBRARY_LOAD, "load"); //$NON-NLS-1$
+ idToKeyword.put(ICEventBreakpoint.EVENT_TYPE_LIBRARY_UNLOAD, "unload"); //$NON-NLS-1$
}
public EventBreakpoint(Target target, String event, String arg, ICDICondition cond, boolean enabled) {
super(target, ICBreakpointType.REGULAR, cond, enabled);
this.eventType = event;
- this.arg = arg==null?"":arg;
+ this.arg = arg==null?"":arg; //$NON-NLS-1$
}
public String getEventType() {
@@ -103,7 +72,7 @@ public class EventBreakpoint extends Breakpoint implements ICDIEventBreakpoint {
String etype = getEventType();
String key= idToKeyword.get(etype);
if (key!=null) return key;
- return "unknown";
+ return "unknown"; //$NON-NLS-1$
}
public String getGdbArg() {
@@ -130,16 +99,16 @@ public class EventBreakpoint extends Breakpoint implements ICDIEventBreakpoint {
* @return null if unknown type, null cannot be used to create valid EventBreakpoint
*/
public static String getEventTypeFromMI(MIBreakpoint miBreakpoint) {
- if (miBreakpoint.getWhat().equals("exception catch")) {
- return EventBreakpoint.CATCH;
- } else if (miBreakpoint.getWhat().equals("exception throw")) {
- return EventBreakpoint.THROW;
- } else if (miBreakpoint.getType().equals("catch signal")) {
+ if (miBreakpoint.getWhat().equals("exception catch")) { //$NON-NLS-1$
+ return ICEventBreakpoint.EVENT_TYPE_CATCH;
+ } else if (miBreakpoint.getWhat().equals("exception throw")) { //$NON-NLS-1$
+ return ICEventBreakpoint.EVENT_TYPE_THROW;
+ } else if (miBreakpoint.getType().equals("catch signal")) { //$NON-NLS-1$
// catch signal does not work in gdb
- return EventBreakpoint.SIGNAL_CATCH;
+ return ICEventBreakpoint.EVENT_TYPE_SIGNAL_CATCH;
}
String miType = miBreakpoint.getType();
- String prefix = "catch ";
+ String prefix = "catch "; //$NON-NLS-1$
if (miType.startsWith(prefix)) {
String key = miType.substring(prefix.length());
for (String id : idToKeyword.keySet()) {
@@ -154,7 +123,7 @@ public class EventBreakpoint extends Breakpoint implements ICDIEventBreakpoint {
public static String getEventArgumentFromMI(MIBreakpoint miBreakpoint) {
// need a working gdb command command that support catch event argument test test
- return "";
+ return ""; //$NON-NLS-1$
}
}
diff --git a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/ErrorThread.java b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/ErrorThread.java
index dd6f1e1254a..3150718bad7 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/ErrorThread.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/ErrorThread.java
@@ -17,7 +17,7 @@ import java.io.OutputStream;
/**
* Receiving, and printing to the console, stderr output
- * @since 6.1
+ * @since 7.0
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
diff --git a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MICatchpointHitEvent.java b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MICatchpointHitEvent.java
index c63d2dafa37..7a06414e3b2 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MICatchpointHitEvent.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/mi/org/eclipse/cdt/debug/mi/core/event/MICatchpointHitEvent.java
@@ -14,7 +14,7 @@ import org.eclipse.cdt.debug.mi.core.MISession;
import org.eclipse.cdt.debug.mi.core.output.MIExecAsyncOutput;
/**
- * @since 6.1
+ * @since 7.0
*/
public class MICatchpointHitEvent extends MIStoppedEvent {
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java
index 1d81fe7cde4..32b56f2ed16 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java
+++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/MIProcessAdapter.java
@@ -109,7 +109,7 @@ public class MIProcessAdapter implements MIProcess {
* @throws IOException
* on failure to create the child process
*
- * @since 6.1
+ * @since 7.0
*/
protected Process createGDBProcess(String[] args) throws IOException {
return ProcessFactory.getFactory().exec(args);

Back to the top