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

# Class DWARFStringOffsetTableHeader

java.lang.Object
ghidra.app.util.bin.format.dwarf.DWARFIndirectTableHeader
ghidra.app.util.bin.format.dwarf.DWARFStringOffsetTableHeader

public class DWARFStringOffsetTableHeader extends DWARFIndirectTableHeader
Table of offsets that point into the string table. These tables are stored sequentially in the `.debug_str_offsets` section.

Elements in the table are referred to by index via `DWARFForm.DW_FORM_strx` and friends.

The table's `DWARFIndirectTableHeader.getFirstElementOffset()` is referred to by a compUnit's `DWARFAttribute.DW_AT_str_offsets_base` value.

- ## Field Summary

  ### Fields inherited from class ghidra.app.util.bin.format.dwarf.DWARFIndirectTableHeader

  `endOffset, firstElementOffset, startOffset`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DWARFStringOffsetTableHeader(long startOffset, long endOffset, long firstElementOffset, int intSize, int count)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getOffset(int index, BinaryReader reader)`
  `static DWARFStringOffsetTableHeader`
  `readV5(BinaryReader reader, int defaultIntSize)`
  Reads a string offset table header (found in the .debug_str_offsets section)

  ### Methods inherited from class ghidra.app.util.bin.format.dwarf.DWARFIndirectTableHeader

  `getEndOffset, getFirstElementOffset, getStartOffset`

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

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

- ## Constructor Details

  - ### DWARFStringOffsetTableHeader

    public DWARFStringOffsetTableHeader(long startOffset, long endOffset, long firstElementOffset, int intSize, int count)

- ## Method Details

  - ### readV5

    public static DWARFStringOffsetTableHeader readV5(BinaryReader reader, int defaultIntSize) throws IOException
    Reads a string offset table header (found in the .debug_str_offsets section)
    Parameters:
      `reader` - `BinaryReader`
    Returns:
      new `DWARFStringOffsetTableHeader` instance
    Throws:
      `IOException` - if error reading

  - ### getOffset

    public long getOffset(int index, BinaryReader reader) throws IOException
    Specified by:
      `getOffset` in class `DWARFIndirectTableHeader`
    Throws:
      `IOException`