Package ghidra.program.model.pcode

# 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 Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Address`
  `pcaddr`
  `protected HighSymbol`
  `symbol`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SymbolEntry(HighSymbol sym)`
  Constructor for use with restoreXML

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract void`
  `decode(Decoder decoder)`
  Decode this entry from the stream.
  `protected void`
  `decodeRangeList(Decoder decoder)`
  `abstract void`
  `encode(Encoder encoder)`
  Encode this entry as (a set of) elements to the given stream
  `protected void`
  `encodeRangelist(Encoder encoder)`
  `Address`
  `getPCAdress()`
  The storage used to hold this Symbol may be used for other purposes at different points in the code.
  `abstract int`
  `getSize()`
  Get the number of bytes consumed by the symbol when using this storage
  `abstract VariableStorage`
  `getStorage()`
  Get the storage associated with this particular mapping of the Symbol
  `abstract boolean`
  `isReadOnly()`
  `abstract boolean`
  `isVolatile()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### symbol

    protected HighSymbol symbol

  - ### pcaddr

    protected Address pcaddr

- ## 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

  - ### isReadOnly

    public abstract boolean isReadOnly()
    Returns:
      true if the mapped storage is read-only

  - ### isVolatile

    public abstract boolean isVolatile()
    Returns:
      true if the mapped storage is volatile

  - ### 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`