Package org.eclipse.cdt.utils.macho

# Class MachO64

java.lang.Object
org.eclipse.cdt.utils.macho.MachO64

All Implemented Interfaces:
  `AutoCloseable`

public class MachO64 extends Object implements AutoCloseable

Since:
  5.2

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`class`
`MachO64.Attribute`
`class`
`MachO64.DyLib`
`class`
`MachO64.DyLibCommand`
`class`
`MachO64.DyLibModule`
`class`
`MachO64.DyLibReference`
`class`
`MachO64.DyLibTableOfContents`
`class`
`MachO64.DyLinkerCommand`
`class`
`MachO64.DySymtabCommand`
`class`
`MachO64.FVMFileCommand`
`class`
`MachO64.FVMLib`
`class`
`MachO64.FVMLibCommand`
`class`
`MachO64.IdentCommand`
`class`
`MachO64.LCStr`
`static class`
`MachO64.Line`
Simple class to implement a line table
`class`
`MachO64.LoadCommand`
`class`
`MachO64.MachOhdr`
`class`
`MachO64.MachUUID`
`class`
`MachO64.PrebindCksumCommand`
`class`
`MachO64.PreboundDyLibCommand`
`class`
`MachO64.RoutinesCommand`
`class`
`MachO64.Section`
`class`
`MachO64.SegmentCommand`
`class`
`MachO64.SubClientCommand`
`class`
`MachO64.SubFrameworkCommand`
`class`
`MachO64.SubLibraryCommand`
`class`
`MachO64.SubUmbrellaCommand`
`class`
`MachO64.Symbol`
`static class`
`MachO64.SymbolComparator`
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`
`MachO64.SymSegCommand`
`class`
`MachO64.SymtabCommand`
`class`
`MachO64.ThreadCommand`
`class`
`MachO64.TwoLevelHint`
`class`
`MachO64.TwoLevelHintsCommand`
`class`
`MachO64.UnknownCommand`

## Field Summary

Fields
Modifier and Type
Field
Description
`protected boolean`
`b64`
`protected CPPFilt`
`cppFilt`
`protected boolean`
`cppFiltEnabled`
`protected boolean`
`debugsym`
`protected ERandomAccessFile`
`efile`
`protected static final String`
`EMPTY_STRING`
`protected String`
`file`
`protected MachO64.LoadCommand[]`
`loadcommands`
`protected MachO64.MachOhdr`
`mhdr`
`protected static final MachO64.SymbolComparator`
`symbol_comparator`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`MachO64()`
``
`MachO64(String file)`
``
`MachO64(String file, boolean filton)`
``
`MachO64(String file, long offset)`
``
`MachO64(String file, long offset, boolean filton)`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`boolean`
`cppFilterEnabled()`
`void`
`dispose()`
`protected void`
`finalize()`
Make sure we do not leak the fds.
`MachO64.Attribute`
`getAttributes()`
`static MachO64.Attribute`
`getAttributes(byte[] array)`
`static MachO64.Attribute`
`getAttributes(String file)`
`MachO64.DyLib[]`
`getDyLibs(int type)`
`MachO64.Symbol[]`
`getDynamicSymbols()`
`String`
`getFilename()`
`MachO64.Line[]`
`getLineTable()`
`MachO64.Symbol[]`
`getLocalSymbols()`
`MachO64.MachOhdr`
`getMachOhdr()`
`MachO64.Section[]`
`getSections()`
`MachO64.Symbol`
`getSymbol(long vma)`
`Object`
`getSymbolReader()`
`MachO64.Symbol[]`
`getSymbols()`
`MachO64.Symbol[]`
`getSymtabSymbols()`
`boolean`
`is64()`
`static boolean`
`isMachOHeader(byte[] bytes)`
`void`
`loadBinary()`
`void`
`setCppFilter(boolean enabled)`
`protected String`
`string_from_macho_symtab(MachO64.SymtabCommand symtab, int index)`
`long`
`swapInt(long val)`
`int`
`swapShort(short val)`

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### efile

protected ERandomAccessFile efile

### mhdr

protected MachO64.MachOhdr mhdr

### loadcommands

protected MachO64.LoadCommand[] loadcommands

### cppFiltEnabled

protected boolean cppFiltEnabled

### cppFilt

protected CPPFilt cppFilt

### file

protected String file

### debugsym

protected boolean debugsym

### b64

protected boolean b64

### EMPTY_STRING

protected static final String EMPTY_STRING

See Also:
  - Constant Field Values

### symbol_comparator

protected static final MachO64.SymbolComparator symbol_comparator

## Constructor Details

### MachO64

protected MachO64()

### MachO64

public MachO64(String file, long offset) throws IOException

Throws:
  `IOException`

### MachO64

public MachO64(String file) throws IOException

Throws:
  `IOException`

### MachO64

public MachO64(String file, long offset, boolean filton) throws IOException

Throws:
  `IOException`

### MachO64

public MachO64(String file, boolean filton) throws IOException

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

public MachO64.MachOhdr getMachOhdr() throws IOException

Throws:
  `IOException`

### getAttributes

public MachO64.Attribute getAttributes() throws IOException

Throws:
  `IOException`

### getAttributes

public static MachO64.Attribute getAttributes(String file) throws IOException

Throws:
  `IOException`

### getAttributes

public static MachO64.Attribute getAttributes(byte[] array) throws IOException

Throws:
  `IOException`

### isMachOHeader

public static boolean isMachOHeader(byte[] bytes)

### close

public void close()

Specified by:
  `close` in interface `AutoCloseable`

### dispose

public void dispose()

### finalize

protected void finalize() throws Throwable
Make sure we do not leak the fds.

Overrides:
  `finalize` in class `Object`
Throws:
  `Throwable`

### loadBinary

public void loadBinary() throws IOException

Throws:
  `IOException`

### is64

public boolean is64()

### getSymbols

public MachO64.Symbol[] getSymbols()

### getDynamicSymbols

public MachO64.Symbol[] getDynamicSymbols()

### getSymtabSymbols

public MachO64.Symbol[] getSymtabSymbols()

### getLocalSymbols

public MachO64.Symbol[] getLocalSymbols()

### getLineTable

public MachO64.Line[] getLineTable()

### getSections

public MachO64.Section[] getSections()

### getDyLibs

public MachO64.DyLib[] getDyLibs(int type)

### getSymbol

public MachO64.Symbol getSymbol(long vma)

### swapInt

public long swapInt(long val)

### swapShort

public int swapShort(short val)

### getFilename

public String getFilename()

### getSymbolReader

public Object getSymbolReader()