mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
Bug 196002 - Set up the mapping from the gdb/mi debugger to the gnu toolchain. Also map the cygwin debugger to the cygwin toolchain. Fix up the launch shortcut so that the longest matching pattern wins the day since both cygwin and mingw would get trumped by the main gnu one. With this single click debug works on Linux.
This commit is contained in:
parent
48c59df306
commit
a00f0ded40
2 changed files with 19 additions and 10 deletions
|
@ -11,14 +11,22 @@
|
|||
id="org.eclipse.cdt.debug.mi.core.CDebuggerNew"
|
||||
modes="run,core,attach"
|
||||
name="%GDBMIDebugger.name"
|
||||
platform="*"/>
|
||||
platform="*">
|
||||
<buildIdPattern
|
||||
pattern="cdt\.managedbuild\.config\.gnu\..*">
|
||||
</buildIdPattern>
|
||||
</debugger>
|
||||
<debugger
|
||||
platform="win32"
|
||||
name="%CygwinGDBDebugger.name"
|
||||
modes="run,core,attach"
|
||||
cpu="native"
|
||||
class="org.eclipse.cdt.debug.mi.core.CygwinGDBCDIDebugger2"
|
||||
id="org.eclipse.cdt.debug.mi.core.CygwinCDebugger"/>
|
||||
cpu="native"
|
||||
id="org.eclipse.cdt.debug.mi.core.CygwinCDebugger"
|
||||
modes="run,core,attach"
|
||||
name="%CygwinGDBDebugger.name"
|
||||
platform="win32">
|
||||
<buildIdPattern
|
||||
pattern="cdt\.managedbuild\.config\.gnu\.cygwin\..*">
|
||||
</buildIdPattern>
|
||||
</debugger>
|
||||
<debugger
|
||||
platform="*"
|
||||
name="%GDBServer.name"
|
||||
|
@ -41,7 +49,7 @@
|
|||
name="%MinGWDebugger.name"
|
||||
platform="win32">
|
||||
<buildIdPattern
|
||||
pattern="cdt\.managedbuild\.config\.gnu\.mingw.*">
|
||||
pattern="cdt\.managedbuild\.config\.gnu\.mingw\..*">
|
||||
</buildIdPattern>
|
||||
</debugger>
|
||||
</extension>
|
||||
|
|
|
@ -120,14 +120,15 @@ public class CApplicationLaunchShortcut implements ILaunchShortcut {
|
|||
ICConfigurationDescription configDesc = projDesc.getActiveConfiguration();
|
||||
String configId = configDesc.getId();
|
||||
ICDebugConfiguration[] debugConfigs = CDebugCorePlugin.getDefault().getActiveDebugConfigurations();
|
||||
outer: for (int i = 0; i < debugConfigs.length; ++i) {
|
||||
int matchLength = 0;
|
||||
for (int i = 0; i < debugConfigs.length; ++i) {
|
||||
ICDebugConfiguration dc = debugConfigs[i];
|
||||
String[] patterns = dc.getSupportedBuildConfigPatterns();
|
||||
if (patterns != null) {
|
||||
for (int j = 0; j < patterns.length; ++j) {
|
||||
if (configId.matches(patterns[j])) {
|
||||
if (patterns[j].length() > matchLength && configId.matches(patterns[j])) {
|
||||
debugConfig = dc;
|
||||
break outer;
|
||||
matchLength = patterns[j].length();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue