[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Let GDB decide if it supports non-native binary file
|
This patch lets the GDB decide if it supports the executable.
Very nice when using e.g. arm-elf-gdb.exe. No need to modify plugin.xml
files.
--
Øyvind Harboe
http://www.zylin.com
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/ChangeLog,v
retrieving revision 1.319
diff -u -r1.319 ChangeLog
--- ChangeLog 6 May 2004 22:03:25 -0000 1.319
+++ ChangeLog 10 May 2004 08:40:45 -0000
@@ -1,3 +1,9 @@
+2004-05-10 Oyvind Harboe
+ CDT no longer tries to to check if the CPU is supported by
+ GDB upfront, since this issomething that only the GDB executable knows.
+ * mi/org/eclipse/cdt/debug/core/ICDebugConfiguration.java
+ * mi/org/eclipse/cdt/debug/internal/core/DebugConfiguration.java
+
2004-05-06 Mikhail Khodjaiants
Implementation of mixed disassembly mode.
* IAsmSourceLine.java: new
Index: src/org/eclipse/cdt/debug/core/ICDebugConfiguration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/ICDebugConfiguration.java,v
retrieving revision 1.5
diff -u -r1.5 ICDebugConfiguration.java
--- src/org/eclipse/cdt/debug/core/ICDebugConfiguration.java 23 Mar 2004 02:48:29 -0000 1.5
+++ src/org/eclipse/cdt/debug/core/ICDebugConfiguration.java 10 May 2004 08:40:45 -0000
@@ -13,8 +13,6 @@
String getName();
String getID();
String getPlatform();
- String[] getCPUList();
String[] getModeList();
- boolean supportsCPU(String cpu);
boolean supportsMode(String mode);
}
Index: src/org/eclipse/cdt/debug/internal/core/DebugConfiguration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/DebugConfiguration.java,v
retrieving revision 1.9
diff -u -r1.9 DebugConfiguration.java
--- src/org/eclipse/cdt/debug/internal/core/DebugConfiguration.java 25 Mar 2004 19:36:58 -0000 1.9
+++ src/org/eclipse/cdt/debug/internal/core/DebugConfiguration.java 10 May 2004 08:40:52 -0000
@@ -20,7 +20,6 @@
*/
private IConfigurationElement fElement;
private HashSet fModes;
- private HashSet fCPUs;
public DebugConfiguration(IConfigurationElement element) {
fElement = element;
@@ -51,10 +50,7 @@
return platform;
}
- public String[] getCPUList() {
- return (String[]) getCPUs().toArray(new String[0]);
- }
-
+
public String[] getModeList() {
return (String[]) getModes().toArray(new String[0]);
}
@@ -63,14 +59,6 @@
return getModes().contains(mode);
}
- public boolean supportsCPU(String cpu) {
- String nativeCPU = BootLoader.getOSArch();
- boolean ret = false;
- if ( nativeCPU.startsWith(cpu) ) {
- ret = getCPUs().contains(PLATFORM_NATIVE);
- }
- return ret || getCPUs().contains(cpu);
- }
/**
* Returns the set of modes specified in the configuration data.
*
@@ -90,28 +78,4 @@
}
return fModes;
}
-
- protected Set getCPUs() {
- if (fCPUs == null) {
- String cpus = getConfigurationElement().getAttribute("cpu"); //$NON-NLS-1$
- if (cpus == null) {
- fCPUs = new HashSet(1);
- fCPUs.add(PLATFORM_NATIVE);
- }
- else {
- String nativeCPU = BootLoader.getOSArch();
- StringTokenizer tokenizer = new StringTokenizer(cpus, ","); //$NON-NLS-1$
- fCPUs = new HashSet(tokenizer.countTokens());
- while (tokenizer.hasMoreTokens()) {
- String cpu = tokenizer.nextToken().trim();
- fCPUs.add(cpu);
- if (nativeCPU.startsWith(cpu)) { // os arch be cpu{le/be}
- fCPUs.add(PLATFORM_NATIVE);
- }
- }
- }
- }
- return fCPUs;
- }
-
}
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.launch/ChangeLog,v
retrieving revision 1.61
diff -u -r1.61 ChangeLog
--- ChangeLog 23 Apr 2004 13:37:21 -0000 1.61
+++ ChangeLog 10 May 2004 08:41:19 -0000
@@ -1,3 +1,9 @@
+2004-05-10 Oyvind Harboe
+ CDT no longer tries to to check if the CPU is supported by
+ GDB upfront, since this issomething that only the GDB executable knows.
+ * src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
+ * src/org/eclipse/cdt/launch/ui/CorefileDebuggerTab.java
+
2004-04-23 David Inglis
fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=59680
Index: src/org/eclipse/cdt/launch/ui/CDebuggerTab.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CDebuggerTab.java,v
retrieving revision 1.29
diff -u -r1.29 CDebuggerTab.java
--- src/org/eclipse/cdt/launch/ui/CDebuggerTab.java 9 Mar 2004 20:42:41 -0000 1.29
+++ src/org/eclipse/cdt/launch/ui/CDebuggerTab.java 10 May 2004 08:41:22 -0000
@@ -153,16 +153,14 @@
boolean isNative = configPlatform.equals(BootLoader.getOS());
if (debuggerPlatform.equalsIgnoreCase(configPlatform)
|| (isNative && debuggerPlatform.equalsIgnoreCase(ICDebugConfiguration.PLATFORM_NATIVE))) {
- if (debugConfigs[i].supportsCPU(programCPU)) {
- fDCombo.add(debugConfigs[i].getName());
- fDCombo.setData(Integer.toString(x), debugConfigs[i]);
- // select first exact matching debugger for platform or requested selection
- if ((selndx == -1 && debuggerPlatform.equalsIgnoreCase(configPlatform))
- || selection.equals(debugConfigs[i].getID())) {
- selndx = x;
- }
- x++;
+ fDCombo.add(debugConfigs[i].getName());
+ fDCombo.setData(Integer.toString(x), debugConfigs[i]);
+ // select first exact matching debugger for platform or requested selection
+ if ((selndx == -1 && debuggerPlatform.equalsIgnoreCase(configPlatform))
+ || selection.equals(debugConfigs[i].getID())) {
+ selndx = x;
}
+ x++;
}
}
}
@@ -294,9 +292,7 @@
String debuggerPlatform = debugConfig.getPlatform();
boolean isNative = platform.equals(projectPlatform);
if (debuggerPlatform.equalsIgnoreCase(projectPlatform) || (isNative && debuggerPlatform.equalsIgnoreCase(ICDebugConfiguration.PLATFORM_NATIVE))) {
- if (debugConfig.supportsCPU(projectCPU)) {
- return true;
- }
+ return true;
}
return false;
}
Index: src/org/eclipse/cdt/launch/ui/CorefileDebuggerTab.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/ui/CorefileDebuggerTab.java,v
retrieving revision 1.13
diff -u -r1.13 CorefileDebuggerTab.java
--- src/org/eclipse/cdt/launch/ui/CorefileDebuggerTab.java 9 Mar 2004 20:42:41 -0000 1.13
+++ src/org/eclipse/cdt/launch/ui/CorefileDebuggerTab.java 10 May 2004 08:41:22 -0000
@@ -89,16 +89,14 @@
String debuggerPlatform = debugConfigs[i].getPlatform();
boolean platformMatch = configPlatform.equals(projectPlatform);
if (debuggerPlatform.equalsIgnoreCase(projectPlatform) || (platformMatch && projectPlatform.equals("*"))) { //$NON-NLS-1$
- if (debugConfigs[i].supportsCPU(projectCPU)) {
- fDCombo.add(debugConfigs[i].getName());
- fDCombo.setData(Integer.toString(x), debugConfigs[i]);
- // select first exact matching debugger for platform or requested selection
- if ((selndx == -1 && debuggerPlatform.equalsIgnoreCase(projectPlatform))
- || selection.equals(debugConfigs[i].getID())) {
- selndx = x;
- }
- x++;
+ fDCombo.add(debugConfigs[i].getName());
+ fDCombo.setData(Integer.toString(x), debugConfigs[i]);
+ // select first exact matching debugger for platform or requested selection
+ if ((selndx == -1 && debuggerPlatform.equalsIgnoreCase(projectPlatform))
+ || selection.equals(debugConfigs[i].getID())) {
+ selndx = x;
}
+ x++;
}
}
}
@@ -161,9 +159,7 @@
String debuggerPlatform = debugConfig.getPlatform();
boolean platformMatch = platform.equals(projectPlatform);
if (debuggerPlatform.equalsIgnoreCase(projectPlatform) || (platformMatch && projectPlatform.equals("*"))) { //$NON-NLS-1$
- if (debugConfig.supportsCPU(projectCPU)) {
- return true;
- }
+ return true;
}
setDebugConfig(null);
return false;
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/ChangeLog,v
retrieving revision 1.225
diff -u -r1.225 ChangeLog
--- ChangeLog 7 May 2004 18:21:22 -0000 1.225
+++ ChangeLog 10 May 2004 08:42:01 -0000
@@ -1,3 +1,9 @@
+2004-05-10 Oyvind Harboe
+ CDT no longer tries to to check if the CPU is supported by
+ GDB upfront, since this issomething that only the GDB executable knows.
+ * mi/org/eclipse/cdt/debug/mi/core/plugin.xml
+
+
2004-05-07 Alain Magloire
PR 57127. Pass the stream verbatim
even if it has spaces.
Index: plugin.xml
===================================================================
RCS file: /home/tools/org.eclipse.cdt.debug.mi.core/plugin.xml,v
retrieving revision 1.21
diff -u -r1.21 plugin.xml
--- plugin.xml 1 Apr 2004 19:44:19 -0000 1.21
+++ plugin.xml 10 May 2004 08:42:02 -0000
@@ -24,10 +24,9 @@
<extension
point="org.eclipse.cdt.debug.core.CDebugger">
<debugger
- platform="native"
+ platform="win32"
name="%GDBDebugger.name"
modes="run,core,attach"
- cpu="native"
class="org.eclipse.cdt.debug.mi.core.GDBDebugger"
id="org.eclipse.cdt.debug.mi.core.CDebugger">
</debugger>
@@ -35,15 +34,13 @@
platform="win32"
name="%CygwinGDBDebugger.name"
modes="run,core,attach"
- cpu="native"
class="org.eclipse.cdt.debug.mi.core.CygwinGDBDebugger"
id="org.eclipse.cdt.debug.mi.core.CygwinCDebugger">
</debugger>
<debugger
- platform="*"
+ platform="win32"
name="%GDBServer.name"
modes="run"
- cpu="*"
class="org.eclipse.cdt.debug.mi.core.GDBServerDebugger"
id="org.eclipse.cdt.debug.mi.core.GDBServerCDebugger">
</debugger>