Class DWARFAbbreviation
java.lang.Object
ghidra.app.util.bin.format.dwarf4.DWARFAbbreviation
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
ConstructorsConstructorDescriptionDWARFAbbreviation
(int abbreviationCode, int tag, boolean hasChildren, DWARFAttributeSpecification[] attributes) -
Method Summary
Modifier and TypeMethodDescriptionfindAttribute
(int attribute) Get the attribute with the given attribute key.int
Get the abbreviation code.getAttributeAt
(int index) Get the attribute at the given index.int
Return a live list of the attributes.int
getTag()
Get the tag value.boolean
Checks to see if this abbreviation has any DIE children.static DWARFAbbreviation
read
(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor) static Map<Integer,
DWARFAbbreviation> readAbbreviations
(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor) toString()
-
Constructor Details
-
DWARFAbbreviation
public DWARFAbbreviation(int abbreviationCode, int tag, boolean hasChildren, DWARFAttributeSpecification[] attributes)
-
-
Method Details
-
read
public static DWARFAbbreviation read(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor) throws IOException, CancelledException - Throws:
IOException
CancelledException
-
readAbbreviations
public static Map<Integer,DWARFAbbreviation> readAbbreviations(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor) throws IOException, CancelledException - Throws:
IOException
CancelledException
-
toString
-
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
Return a live list of the attributes.- Returns:
- list of attributes
-
getAttributeCount
public int getAttributeCount() -
getAttributeAt
Get the attribute at the given index.- Parameters:
index
- index of the attribute- Returns:
- attribute specification
-
findAttribute
Get the attribute with the given attribute key.- Parameters:
attribute
- attribute key- Returns:
- attribute specification
-