1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

simple change to use native defined in interface

This commit is contained in:
David Inglis 2004-03-25 19:36:58 +00:00
parent de5291751a
commit ffde7d87bc

View file

@ -21,7 +21,6 @@ public class DebugConfiguration implements ICDebugConfiguration {
private IConfigurationElement fElement; private IConfigurationElement fElement;
private HashSet fModes; private HashSet fModes;
private HashSet fCPUs; private HashSet fCPUs;
public static final String NATIVE = "native"; //$NON-NLS-1$
public DebugConfiguration(IConfigurationElement element) { public DebugConfiguration(IConfigurationElement element) {
fElement = element; fElement = element;
@ -47,7 +46,7 @@ public class DebugConfiguration implements ICDebugConfiguration {
public String getPlatform() { public String getPlatform() {
String platform = getConfigurationElement().getAttribute("platform"); //$NON-NLS-1$ String platform = getConfigurationElement().getAttribute("platform"); //$NON-NLS-1$
if (platform == null) { if (platform == null) {
return NATIVE; return PLATFORM_NATIVE;
} }
return platform; return platform;
} }
@ -68,7 +67,7 @@ public class DebugConfiguration implements ICDebugConfiguration {
String nativeCPU = BootLoader.getOSArch(); String nativeCPU = BootLoader.getOSArch();
boolean ret = false; boolean ret = false;
if ( nativeCPU.startsWith(cpu) ) { if ( nativeCPU.startsWith(cpu) ) {
ret = getCPUs().contains(NATIVE); ret = getCPUs().contains(PLATFORM_NATIVE);
} }
return ret || getCPUs().contains(cpu); return ret || getCPUs().contains(cpu);
} }
@ -97,7 +96,7 @@ public class DebugConfiguration implements ICDebugConfiguration {
String cpus = getConfigurationElement().getAttribute("cpu"); //$NON-NLS-1$ String cpus = getConfigurationElement().getAttribute("cpu"); //$NON-NLS-1$
if (cpus == null) { if (cpus == null) {
fCPUs = new HashSet(1); fCPUs = new HashSet(1);
fCPUs.add(NATIVE); fCPUs.add(PLATFORM_NATIVE);
} }
else { else {
String nativeCPU = BootLoader.getOSArch(); String nativeCPU = BootLoader.getOSArch();
@ -107,7 +106,7 @@ public class DebugConfiguration implements ICDebugConfiguration {
String cpu = tokenizer.nextToken().trim(); String cpu = tokenizer.nextToken().trim();
fCPUs.add(cpu); fCPUs.add(cpu);
if (nativeCPU.startsWith(cpu)) { // os arch be cpu{le/be} if (nativeCPU.startsWith(cpu)) { // os arch be cpu{le/be}
fCPUs.add(NATIVE); fCPUs.add(PLATFORM_NATIVE);
} }
} }
} }