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
Modifier and TypeClassDescriptionclass
class
class
class
class
class
class
class
class
class
class
class
class
static class
Simple class to implement a line tableclass
class
class
class
class
class
class
class
class
class
class
class
class
static class
We 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.class
class
class
class
class
class
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected CPPFilt
protected boolean
protected boolean
protected ERandomAccessFile
protected static final String
protected String
protected MachO64.LoadCommand[]
protected MachO64.MachOhdr
protected static final MachO64.SymbolComparator
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
boolean
void
dispose()
protected void
finalize()
Make sure we do not leak the fds.static MachO64.Attribute
getAttributes
(byte[] array) static MachO64.Attribute
getAttributes
(String file) getDyLibs
(int type) getSymbol
(long vma) boolean
is64()
static boolean
isMachOHeader
(byte[] bytes) void
void
setCppFilter
(boolean enabled) protected String
string_from_macho_symtab
(MachO64.SymtabCommand symtab, int index) long
swapInt
(long val) int
swapShort
(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:
close
in 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
-