Class DWARFMacroInfoEntry
java.lang.Object
ghidra.app.util.bin.format.dwarf.macro.entry.DWARFMacroInfoEntry
- Direct Known Subclasses:
DWARFMacroDefine,DWARFMacroEndFile,DWARFMacroImport,DWARFMacroStartFile
Represents a generic macro info entry, and can contain any macro entry element.
Specific macro entry classes are derived from this and provide getters to ease fetching
values that are expected for that class. These classes are expected to implement a copy-ctor
that accepts a DWARFMacroInfoEntry containing the raw data to be wrapped, and must be registered
in toSpecializedForm(DWARFMacroInfoEntry) method's switch() statement.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected DWARFMacroHeaderprotected DWARFMacroOpcodeprotected DWARFAttributeValue[]protected int -
Constructor Summary
ConstructorsModifierConstructorDescriptionDWARFMacroInfoEntry(DWARFMacroOpcode opcode, int rawOpcode, DWARFAttributeValue[] operandValues, DWARFMacroHeader macroHeader) protectedDWARFMacroInfoEntry(DWARFMacroOpcode opcode, DWARFMacroHeader macroHeader) protected -
Method Summary
Modifier and TypeMethodDescriptiongetName()<T extends DWARFAttributeValue>
TgetOperand(int index, Class<T> valueClass) protected DWARFAttributeDef<DWARFMacroOpcode> operandDef(int operandIndex) static DWARFMacroInfoEntryread(BinaryReader reader, DWARFMacroHeader macroHeader) Reads a DWARF macro info entry from the stream.static DWARFMacroInfoEntrytoSpecializedForm(DWARFMacroInfoEntry genericEntry) toString()
-
Field Details
-
opcode
-
rawOpcode
protected int rawOpcode -
operandValues
-
macroHeader
-
-
Constructor Details
-
DWARFMacroInfoEntry
-
DWARFMacroInfoEntry
public DWARFMacroInfoEntry(DWARFMacroOpcode opcode, int rawOpcode, DWARFAttributeValue[] operandValues, DWARFMacroHeader macroHeader) -
DWARFMacroInfoEntry
-
-
Method Details
-
read
public static DWARFMacroInfoEntry read(BinaryReader reader, DWARFMacroHeader macroHeader) throws IOException Reads a DWARF macro info entry from the stream.- Parameters:
reader-BinaryReaderstreammacroHeader- the parentDWARFMacroHeader- Returns:
- a
DWARFMacroInfoEntry, or subclass if element is a known opcode, ornullif the element was the end-of-list marker - Throws:
IOException- if error reading or unknown opcode
-
toSpecializedForm
-
getOpcode
-
getName
-
getOperand
public <T extends DWARFAttributeValue> T getOperand(int index, Class<T> valueClass) throws IOException - Throws:
IOException
-
operandDef
-
toString
-