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

# Class DWARFLine

java.lang.Object
ghidra.app.util.bin.format.dwarf.line.DWARFLine

public class DWARFLine extends Object
A structure read from .debug_line, contains indexed source filenames as well as a mapping between addresses and source filename and linenumbers.

TODO: refactor this and other similar classes to derive from DWARFUnitHeader and simplify

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final record`
  `DWARFLine.SourceFileAddr`
  `static final record`
  `DWARFLine.SourceFileInfo`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static DWARFLine`
  `empty()`
  Returns a dummy DWARFLine instance that contains no information.
  `List<DWARFLine.SourceFileAddr>`
  `getAllSourceFileAddrInfo(DWARFCompilationUnit cu, BinaryReader reader)`
  `List<DWARFLine.SourceFileInfo>`
  `getAllSourceFileInfos()`
  `DWARFFile`
  `getDir(int index)`
  `long`
  `getEndOffset()`
  `DWARFFile`
  `getFile(int index)`
  Get a file name given a file index.
  `DWARFLineProgramExecutor`
  `getLineProgramexecutor(DWARFCompilationUnit cu, BinaryReader reader)`
  `long`
  `getStartOffset()`
  `static DWARFLine`
  `read(BinaryReader reader, int defaultIntSize, DWARFCompilationUnit cu)`
  `String`
  `toString()`

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

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

- ## Method Details

  - ### empty

    public static DWARFLine empty()
    Returns a dummy DWARFLine instance that contains no information.
    Returns:
      `DWARFLine` instance with no info

  - ### read

    public static DWARFLine read(BinaryReader reader, int defaultIntSize, DWARFCompilationUnit cu) throws IOException
    Throws:
      `IOException`

  - ### getStartOffset

    public long getStartOffset()

  - ### getEndOffset

    public long getEndOffset()

  - ### getLineProgramexecutor

    public DWARFLineProgramExecutor getLineProgramexecutor(DWARFCompilationUnit cu, BinaryReader reader)

  - ### getAllSourceFileAddrInfo

    public List<DWARFLine.SourceFileAddr> getAllSourceFileAddrInfo(DWARFCompilationUnit cu, BinaryReader reader) throws IOException
    Throws:
      `IOException`

  - ### getAllSourceFileInfos

    public List<DWARFLine.SourceFileInfo> getAllSourceFileInfos()

  - ### getDir

    public DWARFFile getDir(int index) throws IOException
    Throws:
      `IOException`

  - ### getFile

    public DWARFFile getFile(int index) throws IOException
    Get a file name given a file index.
    Parameters:
      `index` - index of the file, where index may not be zero based depending on dwarf version
    Returns:
      file `DWARFFile`
    Throws:
      `IOException` - if invalid index

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`