Class DWARFAbbreviation
- java.lang.Object
-
- ghidra.app.util.bin.format.dwarf4.DWARFAbbreviation
-
public class DWARFAbbreviation extends java.lang.Object
This 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 DWARFAttributeSpecification
findAttribute(int attribute)
Get the attribute with the given attribute key.int
getAbbreviationCode()
Get the abbreviation code.DWARFAttributeSpecification
getAttributeAt(int index)
Get the attribute at the given index.int
getAttributeCount()
DWARFAttributeSpecification[]
getAttributes()
Return a live list of the attributes.int
getTag()
Get the tag value.boolean
hasChildren()
Checks to see if this abbreviation has any DIE children.static DWARFAbbreviation
read(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor)
static java.util.Map<java.lang.Integer,DWARFAbbreviation>
readAbbreviations(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor)
java.lang.String
toString()
-
-
-
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.IOException
CancelledException
-
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.IOException
CancelledException
-
toString
public java.lang.String toString()
- Overrides:
toString
in 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
-
-