Class DWARFAttribute

java.lang.Object
ghidra.app.util.bin.format.dwarf.attribs.DWARFAttribute

public class DWARFAttribute extends Object
Represents an attribute contained in a DIE.
  • Field Details

  • Constructor Details

  • Method Details

    • getDIE

      public DebugInfoEntry getDIE()
      Returns the DIE that contains this attribute.
      Returns:
      the DIE that contains this attribute
    • getCU

      public DWARFCompilationUnit getCU()
      Returns the compilation unit that contains the attribute's DIE.
      Returns:
      the compilation unit that contains the attribute's DIE
    • getValue

      public DWARFAttributeValue getValue()
      Returns the value of this attribute.
      Returns:
      the value of this attribute
    • getValue

      public <T extends DWARFAttributeValue> T getValue(Class<T> clazz)
      Returns the value of this attribute, as a specific type.
      Type Parameters:
      T - expected type of the attribute value
      Parameters:
      clazz - class of the expected type of the attribute value
      Returns:
      the value of this attribute, as a specific type
    • getAttributeName

      public String getAttributeName()
      Returns string name of this attribute's identifier (eg. "DW_AT_high_pc").
      Returns:
      string name of this attribute's identifier (eg. "DW_AT_high_pc")
    • getAttributeForm

      public DWARFForm getAttributeForm()
      Returns the serialization format identifier of this attribute (eg. DW_FORM_ref4).
      Returns:
      the serialization format identifier of this attribute (eg. DW_FORM_ref4)
    • getValueString

      public String getValueString()
      Returns the value of this attribute, as a formatted string.
      Returns:
      the value of this attribute, as a formatted string
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object