Package ghidra.app.util.bin.format.dwarf4

# Class DWARFLine

java.lang.Object
ghidra.app.util.bin.format.dwarf4.DWARFLine

public class DWARFLine extends Object

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `DWARFLine.DWARFFile`
  DWARFFile is used to store file information for each entry in the line section header.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getFile(int index, String compileDirectory)`
  Get a file name given a file index.
  `String`
  `getFullFile(int index, String compileDirectory)`
  Get a file name with the full path included.
  `boolean`
  `isValidFileIndex(int index)`
  Returns true if file exists.
  `static DWARFLine`
  `read(DIEAggregate diea)`
  Read a DWARFLine from the compile unit's DW_AT_stmt_list location in the DebugLine stream (if present).
  `String`
  `toString()`

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

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

- ## Method Details

  - ### read

    public static DWARFLine read(DIEAggregate diea) throws IOException, DWARFException
    Read a DWARFLine from the compile unit's DW_AT_stmt_list location in the DebugLine stream (if present).
    Parameters:
      `diea` - `DIEAggregate` compile unit DIE(a)
    Returns:
      a new DWARFLine instance if DW_AT_stmt_list and stream are present, otherwise null
    Throws:
      `IOException` - if error reading data
      `DWARFException` - if bad DWARF values

  - ### getFullFile

    public String getFullFile(int index, String compileDirectory)
    Get a file name with the full path included.
    Parameters:
      `index` - index of the file
      `compileDirectory` - current compile unit directory
    Returns:
      file name with full path

  - ### getFile

    public String getFile(int index, String compileDirectory)
    Get a file name given a file index.
    Parameters:
      `index` - index of the file
      `compileDirectory` - current compile unit directory
    Returns:
      file name

  - ### isValidFileIndex

    public boolean isValidFileIndex(int index)
    Returns true if file exists.
    Parameters:
      `index` - file number, excluding 0
    Returns:
      boolean true if file exists

  - ### toString

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