Package ghidra.program.model.pcode
Class HighConstant
- java.lang.Object
-
- ghidra.program.model.pcode.HighVariable
-
- ghidra.program.model.pcode.HighConstant
-
public class HighConstant extends HighVariable
A constant that has been given a datatype (like a constant that is really a pointer)
-
-
Constructor Summary
Constructors Constructor Description HighConstant(HighFunction func)Constructor for use with restoreXmlHighConstant(java.lang.String name, DataType type, Varnode vn, Address pc, HighFunction func)Construct a constant NOT associated with a symbol
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AddressgetPCAddress()ScalargetScalar()HighSymbolgetSymbol()Retrieve any underlying HighSymbolvoidrestoreXml(XmlPullParser parser)Restore this HighVariable from a<high>XML tag-
Methods inherited from class ghidra.program.model.pcode.HighVariable
attachInstances, getDataType, getHighFunction, getInstances, getName, getOffset, getRepresentative, getSize, requiresDynamicStorage, restoreInstances, setHighOnInstances
-
-
-
-
Constructor Detail
-
HighConstant
public HighConstant(HighFunction func)
Constructor for use with restoreXml- Parameters:
func- is the HighFunction this constant belongs to
-
HighConstant
public HighConstant(java.lang.String name, DataType type, Varnode vn, Address pc, HighFunction func)Construct a constant NOT associated with a symbol- Parameters:
name- name of variabletype- data type of variablevn- constant varnodepc- code unit address where constant is usedfunc- the associated high function
-
-
Method Detail
-
getSymbol
public HighSymbol getSymbol()
Description copied from class:HighVariableRetrieve any underlying HighSymbol- Specified by:
getSymbolin classHighVariable- Returns:
- the HighSymbol
-
getPCAddress
public Address getPCAddress()
- Returns:
- instruction address the variable comes into scope within the function
-
getScalar
public Scalar getScalar()
- Returns:
- constant as a scalar object
-
restoreXml
public void restoreXml(XmlPullParser parser) throws PcodeXMLException
Description copied from class:HighVariableRestore this HighVariable from a<high>XML tag- Specified by:
restoreXmlin classHighVariable- Parameters:
parser- is the XML stream- Throws:
PcodeXMLException- if the XML is not valid
-
-