Package ghidra.app.util.opinion

# Class DyldCacheUtils.SplitDyldCache

java.lang.Object
ghidra.app.util.opinion.DyldCacheUtils.SplitDyldCache

All Implemented Interfaces:
  `Closeable`, `AutoCloseable`

Enclosing class:
  DyldCacheUtils

public static class DyldCacheUtils.SplitDyldCache extends Object implements Closeable
Class to store a "split" DYLD Cache, which is split across several subcache files (base file, .1, .2, .symbols, etc).

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SplitDyldCache(ByteProvider baseProvider, boolean shouldProcessLocalSymbols, MessageLog log, TaskMonitor monitor)`
  Creates a new `DyldCacheUtils.SplitDyldCache`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `long`
  `getBaseAddress()`
  Gets the base address of the split DYLD cache.
  `DyldCacheHeader`
  `getDyldCacheHeader(int i)`
  Gets the i'th `DyldCacheHeader` in the split DYLD Cache
  `DyldCacheLocalSymbolsInfo`
  `getLocalSymbolInfo()`
  Gets the `DyldCacheLocalSymbolsInfo` from the split DYLD Cache files
  `String`
  `getName(int i)`
  Gets the i'th `name` in the split DYLD Cache
  `ByteProvider`
  `getProvider(int i)`
  Gets the i'th `ByteProvider` in the split DYLD Cache
  `int`
  `size()`
  Gets the number of split DYLD Cache files

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

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

- ## Constructor Details

  - ### SplitDyldCache

    public SplitDyldCache(ByteProvider baseProvider, boolean shouldProcessLocalSymbols, MessageLog log, TaskMonitor monitor) throws IOException, CancelledException
    Creates a new `DyldCacheUtils.SplitDyldCache`
    Parameters:
      `baseProvider` - The `ByteProvider` of the "base" DYLD Cache file
      `shouldProcessLocalSymbols` - True if local symbols should be processed; otherwise, false
      `log` - The log
      `monitor` - A cancelable task monitor
    Throws:
      `IOException` - If there was an IO-related issue with processing the split DYLD Cache
      `CancelledException` - If the user canceled the operation

- ## Method Details

  - ### getProvider

    public ByteProvider getProvider(int i)
    Gets the i'th `ByteProvider` in the split DYLD Cache
    Parameters:
      `i` - The index of the `ByteProvider` to get
    Returns:
      The i'th `ByteProvider` in the split DYLD Cache

  - ### getDyldCacheHeader

    public DyldCacheHeader getDyldCacheHeader(int i)
    Gets the i'th `DyldCacheHeader` in the split DYLD Cache
    Parameters:
      `i` - The index of the `DyldCacheHeader` to get
    Returns:
      The i'th `DyldCacheHeader` in the split DYLD Cache

  - ### getName

    public String getName(int i)
    Gets the i'th `name` in the split DYLD Cache
    Parameters:
      `i` - The index of the `name` to get
    Returns:
      The i'th `name` in the split DYLD Cache

  - ### size

    public int size()
    Gets the number of split DYLD Cache files
    Returns:
      The number of split DYLD Cache files

  - ### getBaseAddress

    public long getBaseAddress()
    Gets the base address of the split DYLD cache. This is where the cache should be loaded in memory.
    Returns:
      The base address of the split DYLD cache

  - ### getLocalSymbolInfo

    public DyldCacheLocalSymbolsInfo getLocalSymbolInfo()
    Gets the `DyldCacheLocalSymbolsInfo` from the split DYLD Cache files
    Returns:
      The `DyldCacheLocalSymbolsInfo` from the split DYLD Cache files, or null if no local symbols are defined

  - ### close

    public void close() throws IOException
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`
    Throws:
      `IOException`