Class DWARFCompileUnit
- java.lang.Object
-
- ghidra.app.util.bin.format.dwarf4.DWARFCompileUnit
-
public class DWARFCompileUnit extends java.lang.Object
DWARFCompileUnit hold some values retrieved from a DWARF DW_TAG_compile_unit DIE.
-
-
Constructor Summary
Constructors Constructor Description DWARFCompileUnit(java.lang.String name, java.lang.String producer, java.lang.String comp_dir, java.lang.Number low_pc, java.lang.Number high_pc, java.lang.Number language, DWARFIdentifierCase identifier_case, boolean hasDWO, DWARFLine line)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCompileDirectory()
Get the compile directory of the compile unitjava.lang.String
getFileByIndex(int index)
Get a file name based on a file index.java.lang.String
getFileName()
Get the filename of the compile unitjava.lang.String
getFullFileByIndex(int index)
Get a file name with the full path included based on a file index.java.lang.Number
getHighPC()
Get the high PC value of the compile unitDWARFIdentifierCase
getIdentifierCase()
Get the identifier case of the compile unitint
getLanguage()
Get the source language of the compile unit.java.lang.Number
getLowPC()
Get the low PC value of the compile unitjava.lang.String
getName()
Get the name of the compile unitjava.lang.String
getProducer()
Get the producer of the compile unitboolean
hasDWO()
static DWARFCompileUnit
read(DIEAggregate diea)
java.lang.String
toString()
-
-
-
Constructor Detail
-
DWARFCompileUnit
public DWARFCompileUnit(java.lang.String name, java.lang.String producer, java.lang.String comp_dir, java.lang.Number low_pc, java.lang.Number high_pc, java.lang.Number language, DWARFIdentifierCase identifier_case, boolean hasDWO, DWARFLine line)
-
-
Method Detail
-
read
public static DWARFCompileUnit read(DIEAggregate diea) throws java.io.IOException, DWARFException
- Throws:
java.io.IOException
DWARFException
-
getName
public java.lang.String getName()
Get the name of the compile unit- Returns:
- the name of the compile unit
-
getFileName
public java.lang.String getFileName()
Get the filename of the compile unit- Returns:
- the filename of the compile unit
-
getFullFileByIndex
public java.lang.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:
java.lang.IllegalArgumentException
- if a negative or invalid file index is given
-
getFileByIndex
public java.lang.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:
java.lang.IllegalArgumentException
- if a negative or invalid file index is given
-
getProducer
public java.lang.String getProducer()
Get the producer of the compile unit- Returns:
- the producer of the compile unit
-
getCompileDirectory
public java.lang.String getCompileDirectory()
Get the compile directory of the compile unit- Returns:
- the compile directory of the compile unit
-
getHighPC
public java.lang.Number getHighPC()
Get the high PC value of the compile unit- Returns:
- the high PC value of the compile unit
-
getLowPC
public java.lang.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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-