Class SymbolEntry

java.lang.Object
ghidra.program.model.pcode.SymbolEntry
Direct Known Subclasses:
DynamicEntry, MappedEntry

public abstract class SymbolEntry extends Object
A mapping from a HighSymbol object to the storage that holds the symbol's value.
  • Field Details

  • Constructor Details

    • SymbolEntry

      public SymbolEntry(HighSymbol sym)
      Constructor for use with restoreXML
      Parameters:
      sym - is the symbol owning this entry
  • Method Details

    • decode

      public abstract void decode(Decoder decoder) throws DecoderException
      Decode this entry from the stream. Typically more than one element is consumed.
      Parameters:
      decoder - is the stream decoder
      Throws:
      DecoderException - for invalid encodings
    • encode

      public abstract void encode(Encoder encoder) throws IOException
      Encode this entry as (a set of) elements to the given stream
      Parameters:
      encoder - is the stream encoder
      Throws:
      IOException - for errors in the underlying stream
    • getStorage

      public abstract VariableStorage getStorage()
      Get the storage associated with this particular mapping of the Symbol
      Returns:
      the storage object
    • getSize

      public abstract int getSize()
      Get the number of bytes consumed by the symbol when using this storage
      Returns:
      the size of this entry
    • getMutability

      public abstract int getMutability()
      Return one of - MutabilitySettingsDefinition.NORMAL - MutabilitySettingsDefinition.VOLATILE - MutabilitySettingsDefinition.CONSTANT
      Returns:
      the mutability setting
    • getPCAdress

      public Address getPCAdress()
      The storage used to hold this Symbol may be used for other purposes at different points in the code. This returns the earliest address in the code where this storage is used for this symbol
      Returns:
      the starting address where the Symbol uses this storage
    • decodeRangeList

      protected void decodeRangeList(Decoder decoder) throws DecoderException
      Throws:
      DecoderException
    • encodeRangelist

      protected void encodeRangelist(Encoder encoder) throws IOException
      Throws:
      IOException