Package ghidra.app.util.bin.format.dwarf
Class DWARFAbbreviation
java.lang.Object
ghidra.app.util.bin.format.dwarf.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
ConstructorsChangeConstructorDescriptionDWARFAbbreviation(int abbreviationCode, int tagId, boolean hasChildren, DWARFAttributeId.AttrDef[] attributes) -
Method Summary
ChangeModifier and TypeMethodDescriptionNEWfindAttribute(DWARFAttributeId attributeId) Get the attribute with the given attribute key.intGet the abbreviation code.MODIFIEDgetAttributeAt(int index) Get the attribute at the given index.intReturn number of attribute values.MODIFIEDReturn a live list of the attributes.getTag()Get the tag value.booleanChecks to see if this abbreviation has any DIE children.NEWstatic DWARFAbbreviationread(BinaryReader reader, DIEContainer dieContainer) Reads aDWARFAbbreviationfrom the stream.NEWstatic Map<Integer, DWARFAbbreviation> readAbbreviations(BinaryReader reader, DIEContainer dieContainer) Reads a list ofDWARFAbbreviation, stopping when the end-of-list marker is encountered.toString()REMOVEDDWARFAbbreviationread(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor) RemovedREMOVEDMap<Integer, DWARFAbbreviation>readAbbreviations(BinaryReader reader, DWARFProgram prog, TaskMonitor monitor) RemovedREMOVEDAttrDeffindAttribute(DWARFAttribute attributeId) Removed
-
Constructor Details
-
DWARFAbbreviation
public DWARFAbbreviation(int abbreviationCode, int tagId, boolean hasChildren, DWARFAttributeId.AttrDef[] attributes)
-
-
Method Details
-
read NEW
public static DWARFAbbreviation read(BinaryReader reader, DIEContainer dieContainer) throws IOException Reads aDWARFAbbreviationfrom the stream.- Parameters:
reader-BinaryReaderstreamdieContainer-DIEContainer- Returns:
DWARFAbbreviation, or null if the stream was at a end-of-list marker- Throws:
IOException- if error reading
-
readAbbreviations NEW
public static Map<Integer,DWARFAbbreviation> readAbbreviations(BinaryReader reader, DIEContainer dieContainer) throws IOException Reads a list ofDWARFAbbreviation, stopping when the end-of-list marker is encountered.- Parameters:
reader-BinaryReader.debug_abbr streamdieContainer-DIEContainer- Returns:
- map of abbrCode -> abbr instance
- Throws:
IOException- if error reading
-
toString
-
getAbbreviationCode
public int getAbbreviationCode()Get the abbreviation code.- Returns:
- the abbreviation code
-
getTag
Get the tag value.- Returns:
- the tag value
-
getTagName
-
hasChildren
public boolean hasChildren()Checks to see if this abbreviation has any DIE children.- Returns:
- true if this abbreviation has DIE children
-
getAttributes MODIFIED
return type: ghidra.app.util.bin.format.dwarf.attribs.DWARFAttribute.AttrDef[] → ghidra.app.util.bin.format.dwarf.attribs.DWARFAttributeId.AttrDef[]-ghidra.app.util.bin.format.dwarf.attribs.DWARFAttribute.AttrDef[] getAttributes()+ghidra.app.util.bin.format.dwarf.attribs.DWARFAttributeId.AttrDef[] getAttributes()Return a live list of the attributes.- Returns:
- list of attributes
-
getAttributeCount
public int getAttributeCount()Return number of attribute values.- Returns:
- number of attribute values
-
getAttributeAt MODIFIED
return type: AttrDef → AttrDef-ghidra.app.util.bin.format.dwarf.attribs.DWARFAttribute.AttrDef getAttributeAt(int index)+ghidra.app.util.bin.format.dwarf.attribs.DWARFAttributeId.AttrDef getAttributeAt(int index)Get the attribute at the given index.- Parameters:
index- index of the attribute- Returns:
- attribute specification
-
findAttribute NEW
Get the attribute with the given attribute key.- Parameters:
attributeId- attribute key- Returns:
- attribute specification
-