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

# Interface DWARFSectionProvider

All Superinterfaces:
  `AutoCloseable`, `Closeable`

All Known Implementing Classes:
  `BaseSectionProvider`, `CompressedSectionProvider`, `DSymSectionProvider`, `ExternalDebugFileSectionProvider`, `NullSectionProvider`

public interface DWARFSectionProvider extends Closeable
A DWARFSectionProvider is responsible for allowing access to DWARF section data of a Ghidra program.

Implementors of this interface need to be registered in `DWARFSectionProviderFactory.sectionProviderFactoryFuncs` and should implement the static method:

`public static DWARFSectionProvider createSectionProviderFor(Program program, TaskMonitor monitor)`

that is called via a java Function wrapper.

`DWARFSectionProvider` instances are responsible for `closing` any `ByteProvider` that has been returned via `getSectionAsByteProvider(String, TaskMonitor)` when the section provider instance is itself closed.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `close()`
  `ByteProvider`
  `getSectionAsByteProvider(String sectionName, TaskMonitor monitor)`
  Returns a ByteProvider for the specified section.
  `boolean`
  `hasSection(String... sectionNames)`
  Returns true if the specified section names are present.
  `default void`
  `updateProgramInfo(Program program)`
  Decorate the specified program with any information that is unique to this section provider.

- ## Method Details

  - ### hasSection

    boolean hasSection(String... sectionNames)
    Returns true if the specified section names are present.
    Parameters:
      `sectionNames` - list of section names to test
    Returns:
      true if all are present, false if not present

  - ### getSectionAsByteProvider

    ByteProvider getSectionAsByteProvider(String sectionName, TaskMonitor monitor) throws IOException
    Returns a ByteProvider for the specified section.
    Parameters:
      `sectionName` - name of the section
      `monitor` - `TaskMonitor` to use when performing long operations
    Returns:
      ByteProvider, which will be closed by the section provider when itself is closed
    Throws:
      `IOException` - if error

  - ### close

    void close()
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `Closeable`

  - ### updateProgramInfo

    default void updateProgramInfo(Program program)
    Decorate the specified program with any information that is unique to this section provider.
    Parameters:
      `program` - `Program` with an active transaction