Class DWARFAbbreviation
- java.lang.Object
-
- ghidra.app.util.bin.format.dwarf4.DWARFAbbreviation
-
public class DWARFAbbreviation extends java.lang.ObjectThis class represents the 'schema' for a DWARF DIE record.A raw DWARF DIE record specifies its abbreviation code (pointing to an instance of this class) and the corresponding DWARFAbbreviation instance has the information about how the raw DIE is laid out.
-
-
Constructor Summary
Constructors Constructor Description DWARFAbbreviation(int abbreviationCode, int tag, boolean hasChildren, DWARFAttributeSpecification[] attributes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DWARFAttributeSpecificationfindAttribute(int attribute)Get the attribute with the given attribute key.intgetAbbreviationCode()Get the abbreviation code.DWARFAttributeSpecificationgetAttributeAt(int index)Get the attribute at the given index.intgetAttributeCount()DWARFAttributeSpecification[]getAttributes()Return a live list of the attributes.intgetTag()Get the tag value.booleanhasChildren()Checks to see if this abbreviation has any DIE children.static DWARFAbbreviationread(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor)static java.util.Map<java.lang.Integer,DWARFAbbreviation>readAbbreviations(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor)java.lang.StringtoString()
-
-
-
Constructor Detail
-
DWARFAbbreviation
public DWARFAbbreviation(int abbreviationCode, int tag, boolean hasChildren, DWARFAttributeSpecification[] attributes)
-
-
Method Detail
-
read
public static DWARFAbbreviation read(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor) throws java.io.IOException, CancelledException
- Throws:
java.io.IOExceptionCancelledException
-
readAbbreviations
public static java.util.Map<java.lang.Integer,DWARFAbbreviation> readAbbreviations(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor) throws java.io.IOException, CancelledException
- Throws:
java.io.IOExceptionCancelledException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getAbbreviationCode
public int getAbbreviationCode()
Get the abbreviation code.- Returns:
- the abbreviation code
-
getTag
public int getTag()
Get the tag value.- Returns:
- the tag value
-
hasChildren
public boolean hasChildren()
Checks to see if this abbreviation has any DIE children.- Returns:
- true if this abbreviation has DIE children
-
getAttributes
public DWARFAttributeSpecification[] getAttributes()
Return a live list of the attributes.- Returns:
- list of attributes
-
getAttributeCount
public int getAttributeCount()
-
getAttributeAt
public DWARFAttributeSpecification getAttributeAt(int index)
Get the attribute at the given index.- Parameters:
index- index of the attribute- Returns:
- attribute specification
-
findAttribute
public DWARFAttributeSpecification findAttribute(int attribute)
Get the attribute with the given attribute key.- Parameters:
attribute- attribute key- Returns:
- attribute specification
-
-