1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-31 21:05:37 +02:00

change to getCPU string

This commit is contained in:
David Inglis 2002-11-01 18:00:28 +00:00
parent f58a8c96ee
commit e70e1ce0f3
2 changed files with 12 additions and 13 deletions

View file

@ -1,3 +1,8 @@
2002-11-01 David Inglis
* utils/org/eclipse/cdt/utils/elf/Elf.java
change getCPU to return cpu only and not append endian ("le" or "be").
2002-10-31 Alain Magloire 2002-10-31 Alain Magloire
* src/.../ErrorParserManager.java (findFilePath): * src/.../ErrorParserManager.java (findFilePath):

View file

@ -611,7 +611,6 @@ public class Elf {
public Attribute getAttributes() throws IOException { public Attribute getAttributes() throws IOException {
boolean bSkipElfData = false;
Attribute attrib = new Attribute(); Attribute attrib = new Attribute();
switch( ehdr.e_type ) { switch( ehdr.e_type ) {
@ -630,7 +629,6 @@ public class Elf {
case Elf.ELFhdr.EM_386 : case Elf.ELFhdr.EM_386 :
case Elf.ELFhdr.EM_486 : case Elf.ELFhdr.EM_486 :
attrib.cpu = new String("x86"); attrib.cpu = new String("x86");
bSkipElfData = true;
break; break;
case Elf.ELFhdr.EM_PPC : case Elf.ELFhdr.EM_PPC :
attrib.cpu = new String("ppc"); attrib.cpu = new String("ppc");
@ -654,17 +652,13 @@ public class Elf {
default: default:
attrib.cpu = "none"; attrib.cpu = "none";
} }
if (!bSkipElfData) { switch (ehdr.e_ident[Elf.ELFhdr.EI_DATA]) {
switch (ehdr.e_ident[Elf.ELFhdr.EI_DATA]) { case Elf.ELFhdr.ELFDATA2LSB :
case Elf.ELFhdr.ELFDATA2LSB : attrib.isle = true;
attrib.cpu+= "le"; break;
attrib.isle = true; case Elf.ELFhdr.ELFDATA2MSB :
break; attrib.isle = false;
case Elf.ELFhdr.ELFDATA2MSB : break;
attrib.cpu += "be";
attrib.isle = false;
break;
}
} }
// getSections // getSections
// find .debug using toString // find .debug using toString