1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

added new gdb Debugger extension

This commit is contained in:
David Inglis 2002-08-13 04:03:45 +00:00
parent 912ea8b98a
commit a4f0fa4e7e
5 changed files with 71 additions and 4 deletions

View file

@ -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>

View file

@ -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>

View file

@ -0,0 +1,2 @@
Plugin.name=GDB/MI CDT Debugger Core
GDBDebugger.name=GDB Debugger

View file

@ -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>

View file

@ -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));
}
}
}