Class DWARFAttributeDef<E extends Enum<E>>
java.lang.Object
ghidra.app.util.bin.format.dwarf.attribs.DWARFAttributeDef<E>
- Type Parameters:
E
- attribute id enum type
- Direct Known Subclasses:
DWARFAttribute.AttrDef
,DWARFLineContentType.Def
Information about a single DWARF attribute, as specified in a
abbreviation
.
This class handles the case where a specified attribute id is unknown to us (therefore not listed in the attribute enum class), as well as the case where the form is customized with an implicitValue.
Unknown forms are not supported and cause an exception.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDWARFAttributeDef
(E attributeId, int rawAttributeId, DWARFForm attributeForm, long implicitValue) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Get the form of the attribute specification.Get the attribute id of the attribute specification.long
int
protected String
int
hashCode()
boolean
static <E extends Enum<E>>
DWARFAttributeDef<E> read
(BinaryReader reader, Function<Integer, E> mapper) Reads aDWARFAttributeDef
instance from thereader
.toString()
-
Field Details
-
attributeId
-
attributeForm
-
rawAttributeId
protected final int rawAttributeId -
implicitValue
protected final long implicitValue
-
-
Constructor Details
-
DWARFAttributeDef
-
-
Method Details
-
read
public static <E extends Enum<E>> DWARFAttributeDef<E> read(BinaryReader reader, Function<Integer, E> mapper) throws IOExceptionReads aDWARFAttributeDef
instance from thereader
.Returns a null if its a end-of-list marker (which is only used by an attributespec list).
- Type Parameters:
E
- attribute id enum type- Parameters:
reader
-BinaryReader
mapper
- func that converts an attribute id int into its enum- Returns:
- DWARFAttributeDef instance, or null if EOL marker was read from the stream
- Throws:
IOException
- if error reading
-
getAttributeId
Get the attribute id of the attribute specification.- Returns:
- the attribute value
-
getRawAttributeId
public int getRawAttributeId() -
getAttributeName
-
getRawAttributeIdDescription
-
getAttributeForm
Get the form of the attribute specification.- Returns:
- the form value
-
isImplicit
public boolean isImplicit() -
getImplicitValue
public long getImplicitValue() -
withForm
-
toString
-
hashCode
public int hashCode() -
equals
-