Class DWARFCompileUnit

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

public class DWARFCompileUnit extends Object
DWARFCompileUnit hold some values retrieved from a DWARF DW_TAG_compile_unit DIE.

  • Constructor Details

  • Method Details

    • read

      public static DWARFCompileUnit read(DIEAggregate diea) throws IOException, DWARFException
      Throws:
      IOException
      DWARFException
    • getName

      public String getName()
      Get the name of the compile unit
      Returns:
      the name of the compile unit
    • getFileName

      public String getFileName()
      Get the filename of the compile unit
      Returns:
      the filename of the compile unit
    • getFullFileByIndex

      public String getFullFileByIndex(int index)
      Get a file name with the full path included based on a file index.
      Parameters:
      index - index of the file
      Returns:
      file name with full path or null if line information does not exist
      Throws:
      IllegalArgumentException - if a negative or invalid file index is given
    • getFileByIndex

      public String getFileByIndex(int index)
      Get a file name based on a file index.
      Parameters:
      index - index of the file
      Returns:
      file name or null if line information does not exist
      Throws:
      IllegalArgumentException - if a negative or invalid file index is given
    • isValidFileIndex

      public boolean isValidFileIndex(int index)
      Checks validity of a file index number.
      Parameters:
      index - file number, 1..N
      Returns:
      boolean true if index is a valid file number, false otherwise
    • getProducer

      public String getProducer()
      Get the producer of the compile unit
      Returns:
      the producer of the compile unit
    • getCompileDirectory

      public String getCompileDirectory()
      Get the compile directory of the compile unit
      Returns:
      the compile directory of the compile unit
    • getHighPC

      public Number getHighPC()
      Get the high PC value of the compile unit
      Returns:
      the high PC value of the compile unit
    • getLowPC

      public Number getLowPC()
      Get the low PC value of the compile unit
      Returns:
      the low PC value of the compile unit
    • getLanguage

      public int getLanguage()
      Get the source language of the compile unit.

      See DWARFSourceLanguage for values.

      Returns:
      the source language of the compile unit
    • getIdentifierCase

      public DWARFIdentifierCase getIdentifierCase()
      Get the identifier case of the compile unit
      Returns:
      the identifier case of the compile unit
    • hasDWO

      public boolean hasDWO()
    • toString

      public String toString()
      Overrides:
      toString in class Object