Class DebugInfoEntry


  • public class DebugInfoEntry
    extends java.lang.Object
    A DWARF Debug Info Entry is a collection of attributes in a hierarchical structure (see getParent(), getChildren()).

    This class is a lower-level class and DIEAggregate should be used instead in most cases when examining information from the DWARF system.

    • Method Detail

      • addChild

        public void addChild​(DebugInfoEntry child)
        Add a child DIE to this DIE.
        Parameters:
        child - DIE of the child
      • getChildren

        public java.util.List<DebugInfoEntry> getChildren()
        Return a live list of the child DIE's.
        Returns:
        list of child DIE's
      • getChildren

        public java.util.List<DebugInfoEntry> getChildren​(int childTag)
        Return a list of children that are of a specific DWARF type.

        Parameters:
        childTag -
        Returns:
      • hasChildren

        public boolean hasChildren()
        Check to see if this DIE has any child DIE's.
        Returns:
        true if there are child DIE's and false otherwise
      • setParent

        public void setParent​(DebugInfoEntry parent)
        Set the parent DIE of this DIE.
        Parameters:
        parent - the parent DIE
      • getParent

        public DebugInfoEntry getParent()
        Get the parent DIE of this DIE.
        Returns:
        the parent DIE
      • getOffset

        public long getOffset()
        Get the offset of this DIE from the beginning of the debug_info section.
        Returns:
        the offset of this DIE from the beginning of the debug_info section
      • getTag

        public int getTag()
        Get the DWARFTag value of this DIE.
        Returns:
        the DWARFTag value of this DIE
      • hasAttribute

        public boolean hasAttribute​(int attribute)
        Check to see if this DIE has the given attribute key.
        Parameters:
        attribute - the attribute key
        Returns:
        true if the DIE contains the attribute and false otherwise
      • getAbbreviation

        public DWARFAbbreviation getAbbreviation()
        Get the abbreviation of this DIE.
        Returns:
        the abbreviation of this DIE
      • isTerminator

        public boolean isTerminator()
        Check to see if the DIE is a terminator.
        Returns:
        true if the DIE is a terminator and false otherwise
      • toString

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

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object