diff options
author | Sven Gothel <[email protected]> | 2015-02-01 05:21:39 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2015-02-01 05:21:39 +0100 |
commit | a3f2d08801c5a54048faca52f422bcededf81b2a (patch) | |
tree | 96e83956b62ae3e25043ccc67f4cb1c2c1f232a1 /src/java/com/jogamp/common/os/MachineDescription.java | |
parent | 0deceee37d943faa7c34971388863a27f395d6a5 (diff) |
Bug 1125 - Make ELF Reader 'jogamp.common.os.elf' Stateless
ELF Reader 'jogamp.common.os.elf' currently uses
Platform's pre-determined OS_TYPE and CPUType.
It also uses the host platforms MachineDescription,
hence can not read ELF files from other machines.
This also forbids Platform to determine CPUType etc
w/o having a valid 'os.arch' property.
+++
ElfHeader should be split in
- ElfHeaderPart1 (CPUType independent)
- ElfHeaderPart2 (CPUType dependent)
Fix shall make the ELF Reader self containing
by only using ELF CPUType data, etc.
This requires customization of struct parsing,
where MachineDescription.Static index shall be
- defined in ElfHeaderPart1 using e_Ident's CPUType.
- used in ElfHeaderPart2 and all its struct types.
Diffstat (limited to 'src/java/com/jogamp/common/os/MachineDescription.java')
-rw-r--r-- | src/java/com/jogamp/common/os/MachineDescription.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/java/com/jogamp/common/os/MachineDescription.java b/src/java/com/jogamp/common/os/MachineDescription.java index 98093d0..2a4627e 100644 --- a/src/java/com/jogamp/common/os/MachineDescription.java +++ b/src/java/com/jogamp/common/os/MachineDescription.java @@ -104,7 +104,7 @@ public class MachineDescription { alignments[j++]); } - public StringBuilder toString(StringBuilder sb) { + public final StringBuilder toString(StringBuilder sb) { if(null==sb) { sb = new StringBuilder(); } @@ -112,7 +112,9 @@ public class MachineDescription { md.toString(sb); return sb; } - + public final String toShortString() { + return this.name()+"("+this.ordinal()+")"; + } @Override public String toString() { return toString(null).toString(); |