mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-06 07:45:50 +02:00
added new gdb Debugger extension
This commit is contained in:
parent
912ea8b98a
commit
a4f0fa4e7e
5 changed files with 71 additions and 4 deletions
|
@ -1,9 +1,11 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<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.runtime"/>
|
||||||
<classpathentry kind="src" path="/org.eclipse.core.boot"/>
|
<classpathentry kind="src" path="/org.eclipse.core.boot"/>
|
||||||
<classpathentry kind="var" path="JRE_LIB" rootpath="JRE_SRCROOT" sourcepath="JRE_SRC"/>
|
<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"/>
|
<classpathentry kind="output" path="bin"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
|
@ -5,7 +5,9 @@
|
||||||
<projects>
|
<projects>
|
||||||
<project>org.eclipse.cdt.debug.core</project>
|
<project>org.eclipse.cdt.debug.core</project>
|
||||||
<project>org.eclipse.core.boot</project>
|
<project>org.eclipse.core.boot</project>
|
||||||
|
<project>org.eclipse.core.resources</project>
|
||||||
<project>org.eclipse.core.runtime</project>
|
<project>org.eclipse.core.runtime</project>
|
||||||
|
<project>org.eclipse.debug.core</project>
|
||||||
</projects>
|
</projects>
|
||||||
<buildSpec>
|
<buildSpec>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
|
|
2
debug/org.eclipse.cdt.debug.mi.core/plugin.properties
Normal file
2
debug/org.eclipse.cdt.debug.mi.core/plugin.properties
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Plugin.name=GDB/MI CDT Debugger Core
|
||||||
|
GDBDebugger.name=GDB Debugger
|
|
@ -1,11 +1,27 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<plugin
|
<plugin
|
||||||
id="org.eclipse.cdt.debug.mi.core"
|
id="org.eclipse.cdt.debug.mi.core"
|
||||||
name="org.eclipse.cdt.debug.mi.core"
|
name="%Plugin.name"
|
||||||
version="1.0.0">
|
version="1.0.0"
|
||||||
|
class="org.eclipse.cdt.debug.mi.core.MIPlugin">
|
||||||
|
|
||||||
<runtime>
|
<runtime>
|
||||||
<library name="micore.jar"/>
|
<library name="micore.jar"/>
|
||||||
</runtime>
|
</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>
|
</plugin>
|
||||||
|
|
|
@ -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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue