Package ghidra.app.util.bin.format.dwarf

# Class DWARFIndirectTable

java.lang.Object
ghidra.app.util.bin.format.dwarf.DWARFIndirectTable

public class DWARFIndirectTable extends Object
Handles a grouping of `DWARFIndirectTableHeader`s that specify how to look up a certain type of item (per CU).

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `DWARFIndirectTable.CheckedIOFunction<T,R>`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DWARFIndirectTable(BinaryReader reader, Function<DWARFCompilationUnit,Long> baseOffsetFunc)`
  Creates a `DWARFIndirectTable`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `bootstrap(String msg, DWARFIndirectTable.CheckedIOFunction<BinaryReader,? extends DWARFIndirectTableHeader> headerReader, TaskMonitor monitor)`
  Populates this instance will all `DWARFIndirectTableHeader` instances that can be read from the stream.
  `void`
  `clear()`
  `long`
  `getOffset(int index, DWARFCompilationUnit cu)`
  Returns the offset of an item, based on its index in a particular header (which is found by the controlling CU)

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

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

- ## Constructor Details

  - ### DWARFIndirectTable

    public DWARFIndirectTable(BinaryReader reader, Function<DWARFCompilationUnit,Long> baseOffsetFunc)
    Creates a `DWARFIndirectTable`
    Parameters:
      `reader` - `BinaryReader` containing the `DWARFIndirectTableHeader`s
      `baseOffsetFunc` - a function that will return the baseoffset value for a `DWARFCompilationUnit`.

- ## Method Details

  - ### bootstrap

    public void bootstrap(String msg, DWARFIndirectTable.CheckedIOFunction<BinaryReader,? extends DWARFIndirectTableHeader> headerReader, TaskMonitor monitor) throws CancelledException, IOException
    Populates this instance will all `DWARFIndirectTableHeader` instances that can be read from the stream.
    Parameters:
      `msg` - String message to use for the taskmonitor
      `headerReader` - a function that reads the specific table header type from the stream
      `monitor` - `TaskMonitor`
    Throws:
      `CancelledException` - if cancelled
      `IOException` - if error reading a header

  - ### getOffset

    public long getOffset(int index, DWARFCompilationUnit cu) throws IOException
    Returns the offset of an item, based on its index in a particular header (which is found by the controlling CU)
    Parameters:
      `index` - index of the item
      `cu` - `DWARFCompilationUnit`
    Returns:
      long offset of the item. Caller responsible for reading the item themselves
    Throws:
      `IOException` - if error reading table data

  - ### clear

    public void clear()