Package org.eclipse.cdt.utils.macho
Class MachO64
java.lang.Object
org.eclipse.cdt.utils.macho.MachO64
- All Implemented Interfaces:
AutoCloseable
- Since:
- 5.2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassclassclassclassclassclassclassclassclassclassclassclassstatic classSimple class to implement a line tableclassclassclassclassclassclassclassclassclassclassclassclassclassstatic classWe have to implement a separate comparator since when we do the binary search down below we are using a Long and a Symbol object and the Long doesn't know how to compare against a Symbol so if we compare Symbol vs Long it is ok, but not if we do Long vs Symbol.classclassclassclassclassclass -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected CPPFiltprotected booleanprotected booleanprotected ERandomAccessFileprotected static final Stringprotected Stringprotected MachO64.LoadCommand[]protected MachO64.MachOhdrprotected static final MachO64.SymbolComparator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()booleanvoiddispose()protected voidfinalize()Make sure we do not leak the fds.static MachO64.AttributegetAttributes(byte[] array) static MachO64.AttributegetAttributes(String file) getDyLibs(int type) getSymbol(long vma) booleanis64()static booleanisMachOHeader(byte[] bytes) voidvoidsetCppFilter(boolean enabled) protected Stringstring_from_macho_symtab(MachO64.SymtabCommand symtab, int index) longswapInt(long val) intswapShort(short val)
-
Field Details
-
efile
-
mhdr
-
loadcommands
-
cppFiltEnabled
protected boolean cppFiltEnabled -
cppFilt
-
file
-
debugsym
protected boolean debugsym -
b64
protected boolean b64 -
EMPTY_STRING
- See Also:
-
symbol_comparator
-
-
Constructor Details
-
MachO64
protected MachO64() -
MachO64
- Throws:
IOException
-
MachO64
- Throws:
IOException
-
MachO64
- Throws:
IOException
-
MachO64
- Throws:
IOException
-
-
Method Details
-
string_from_macho_symtab
protected String string_from_macho_symtab(MachO64.SymtabCommand symtab, int index) throws IOException - Throws:
IOException
-
cppFilterEnabled
public boolean cppFilterEnabled() -
setCppFilter
public void setCppFilter(boolean enabled) -
getMachOhdr
- Throws:
IOException
-
getAttributes
- Throws:
IOException
-
getAttributes
- Throws:
IOException
-
getAttributes
- Throws:
IOException
-
isMachOHeader
public static boolean isMachOHeader(byte[] bytes) -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
dispose
public void dispose() -
finalize
Make sure we do not leak the fds. -
loadBinary
- Throws:
IOException
-
is64
public boolean is64() -
getSymbols
-
getDynamicSymbols
-
getSymtabSymbols
-
getLocalSymbols
-
getLineTable
-
getSections
-
getDyLibs
-
getSymbol
-
swapInt
public long swapInt(long val) -
swapShort
public int swapShort(short val) -
getFilename
-
getSymbolReader
-