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 Details

    • HighConstant

      public HighConstant(HighFunction func)
      Constructor for use with restoreXml
      Parameters:
      func - is the HighFunction this constant belongs to
    • HighConstant

      public HighConstant(String name, DataType type, Varnode vn, Address pc, HighFunction func)
      Construct a constant NOT associated with a symbol
      Parameters:
      name - name of variable
      type - data type of variable
      vn - constant varnode
      pc - code unit address where constant is used
      func - the associated high function
  • Method Details

    • getSymbol

      public HighSymbol getSymbol()
      Description copied from class: HighVariable
      Retrieve any underlying HighSymbol
      Specified by:
      getSymbol in class HighVariable
      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
    • decode

      public void decode(Decoder decoder) throws DecoderException
      Description copied from class: HighVariable
      Decode this HighVariable from a <high> element in the stream
      Specified by:
      decode in class HighVariable
      Parameters:
      decoder - is the stream decoder
      Throws:
      DecoderException - for invalid encodings