Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.core')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/.classpath6
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/.project2
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/plugin.properties2
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/plugin.xml20
-rw-r--r--debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java45
5 files changed, 71 insertions, 4 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.core/.classpath b/debug/org.eclipse.cdt.debug.mi.core/.classpath
index 2821669df5f..dcb50cb4820 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/.classpath
+++ b/debug/org.eclipse.cdt.debug.mi.core/.classpath
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="src/"/>
+ <classpathentry kind="src" path="/org.eclipse.cdt.debug.core"/>
+ <classpathentry kind="src" path="/org.eclipse.core.resources"/>
+ <classpathentry kind="src" path="/org.eclipse.debug.core"/>
<classpathentry kind="src" path="/org.eclipse.core.runtime"/>
<classpathentry kind="src" path="/org.eclipse.core.boot"/>
<classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
- <classpathentry kind="src" path="/org.eclipse.cdt.debug.core"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/debug/org.eclipse.cdt.debug.mi.core/.project b/debug/org.eclipse.cdt.debug.mi.core/.project
index 65c92e96b21..801091af765 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/.project
+++ b/debug/org.eclipse.cdt.debug.mi.core/.project
@@ -5,7 +5,9 @@
<projects>
<project>org.eclipse.cdt.debug.core</project>
<project>org.eclipse.core.boot</project>
+ <project>org.eclipse.core.resources</project>
<project>org.eclipse.core.runtime</project>
+ <project>org.eclipse.debug.core</project>
</projects>
<buildSpec>
<buildCommand>
diff --git a/debug/org.eclipse.cdt.debug.mi.core/plugin.properties b/debug/org.eclipse.cdt.debug.mi.core/plugin.properties
new file mode 100644
index 00000000000..f5f1edd3475
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.mi.core/plugin.properties
@@ -0,0 +1,2 @@
+Plugin.name=GDB/MI CDT Debugger Core
+GDBDebugger.name=GDB Debugger \ No newline at end of file
diff --git a/debug/org.eclipse.cdt.debug.mi.core/plugin.xml b/debug/org.eclipse.cdt.debug.mi.core/plugin.xml
index cefe82ba6f1..ab2026061bb 100644
--- a/debug/org.eclipse.cdt.debug.mi.core/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.mi.core/plugin.xml
@@ -1,11 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<plugin
id="org.eclipse.cdt.debug.mi.core"
- name="org.eclipse.cdt.debug.mi.core"
- version="1.0.0">
+ name="%Plugin.name"
+ version="1.0.0"
+ class="org.eclipse.cdt.debug.mi.core.MIPlugin">
<runtime>
<library name="micore.jar"/>
</runtime>
+ <requires>
+ <import plugin="org.eclipse.cdt.debug.core"/>
+ <import plugin="org.eclipse.core.resources"/>
+ <import plugin="org.eclipse.debug.core"/>
+ </requires>
+
+
+ <extension
+ id="gdb"
+ name="%GDBDebugger.name"
+ point="org.eclipse.cdt.debug.core.CDebugger">
+ <debugger
+ class="org.eclipse.cdt.debug.mi.core.GDBDebugger">
+ </debugger>
+ </extension>
</plugin>
diff --git a/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java
new file mode 100644
index 00000000000..7aa0568b3cb
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.mi.core/src/org/eclipse/cdt/debug/mi/core/GDBDebugger.java
@@ -0,0 +1,45 @@
+/*
+ * (c) Copyright QNX Software System Ltd. 2002.
+ * All Rights Reserved.
+ */
+package org.eclipse.cdt.debug.mi.core;
+
+import java.io.IOException;
+
+import org.eclipse.cdt.debug.core.ICDebugger;
+import org.eclipse.cdt.debug.core.cdi.CDIException;
+import org.eclipse.cdt.debug.core.cdi.ICDISession;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.debug.core.ILaunchConfiguration;
+
+public class GDBDebugger implements ICDebugger {
+
+ public ICDISession createLaunchSession(ILaunchConfiguration config, IFile exe) throws CDIException {
+ try {
+ return MIPlugin.getDefault().createCSession(exe.getLocation().toOSString());
+ }
+ catch (IOException e) {
+ throw new CDIException(new Status(0, MIPlugin.getDefault().getDescriptor().getUniqueIdentifier(), 0, "error", e));
+ }
+ }
+
+ public ICDISession createAttachSession(ILaunchConfiguration config, IFile exe, int pid) throws CDIException {
+ try {
+ return MIPlugin.getDefault().createCSession(exe.getLocation().toOSString(), pid);
+ }
+ catch (IOException e) {
+ throw new CDIException(new Status(0, MIPlugin.getDefault().getDescriptor().getUniqueIdentifier(), 0, "error", e));
+ }
+ }
+
+ public ICDISession createCoreSession(ILaunchConfiguration config, IFile exe, IFile corefile) throws CDIException {
+ try {
+ return MIPlugin.getDefault().createCSession(exe.getLocation().toOSString(), corefile.getLocation().toOSString());
+ }
+ catch (IOException e) {
+ throw new CDIException(new Status(0, MIPlugin.getDefault().getDescriptor().getUniqueIdentifier(), 0, "error", e));
+ }
+ }
+
+}

Back to the top