Package ghidra.program.model.pcode

# Class MappedEntry

java.lang.Object
ghidra.program.model.pcode.SymbolEntry
ghidra.program.model.pcode.MappedEntry

Direct Known Subclasses:
  `MappedDataEntry`

public class MappedEntry extends SymbolEntry
A normal mapping of a HighSymbol to a particular Address, consuming a set number of bytes

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected VariableStorage`
  `storage`

  ### Fields inherited from class ghidra.program.model.pcode.SymbolEntry

  `pcaddr, symbol`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MappedEntry(HighSymbol sym)`
  For use with restoreXML
  `MappedEntry(HighSymbol sym, VariableStorage store, Address addr)`
  Construct given a symbol, storage, and first-use Address

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `decode(Decoder decoder)`
  Decode this entry from the stream.
  `void`
  `encode(Encoder encoder)`
  Encode this entry as (a set of) elements to the given stream
  `int`
  `getMutability()`
  Return one of - MutabilitySettingsDefinition.NORMAL - MutabilitySettingsDefinition.VOLATILE - MutabilitySettingsDefinition.CONSTANT
  `static int`
  `getMutabilityOfAddress(Address addr, Program program)`
  Get the underlying mutability setting of an Address based on the Program configuration and the MemoryBlock.
  `int`
  `getSize()`
  Get the number of bytes consumed by the symbol when using this storage
  `VariableStorage`
  `getStorage()`
  Get the storage associated with this particular mapping of the Symbol

  ### Methods inherited from class ghidra.program.model.pcode.SymbolEntry

  `decodeRangeList, encodeRangelist, getPCAdress`

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

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

- ## Field Details

  - ### storage

    protected VariableStorage storage

- ## Constructor Details

  - ### MappedEntry

    public MappedEntry(HighSymbol sym)
    For use with restoreXML
    Parameters:
      `sym` - is the owning symbol

  - ### MappedEntry

    public MappedEntry(HighSymbol sym, VariableStorage store, Address addr)
    Construct given a symbol, storage, and first-use Address
    Parameters:
      `sym` - is the given symbol
      `store` - is the given storage
      `addr` - is the first-use Address (or null)

- ## Method Details

  - ### decode

    public void decode(Decoder decoder) throws DecoderException
    Description copied from class: `SymbolEntry`
    Decode this entry from the stream. Typically more than one element is consumed.
    Specified by:
      `decode` in class `SymbolEntry`
    Parameters:
      `decoder` - is the stream decoder
    Throws:
      `DecoderException` - for invalid encodings

  - ### encode

    public void encode(Encoder encoder) throws IOException
    Description copied from class: `SymbolEntry`
    Encode this entry as (a set of) elements to the given stream
    Specified by:
      `encode` in class `SymbolEntry`
    Parameters:
      `encoder` - is the stream encoder
    Throws:
      `IOException` - for errors in the underlying stream

  - ### getStorage

    public VariableStorage getStorage()
    Description copied from class: `SymbolEntry`
    Get the storage associated with this particular mapping of the Symbol
    Specified by:
      `getStorage` in class `SymbolEntry`
    Returns:
      the storage object

  - ### getSize

    public int getSize()
    Description copied from class: `SymbolEntry`
    Get the number of bytes consumed by the symbol when using this storage
    Specified by:
      `getSize` in class `SymbolEntry`
    Returns:
      the size of this entry

  - ### getMutability

    public int getMutability()
    Description copied from class: `SymbolEntry`
    Return one of - MutabilitySettingsDefinition.NORMAL - MutabilitySettingsDefinition.VOLATILE - MutabilitySettingsDefinition.CONSTANT
    Specified by:
      `getMutability` in class `SymbolEntry`
    Returns:
      the mutability setting

  - ### getMutabilityOfAddress

    public static int getMutabilityOfAddress(Address addr, Program program)
    Get the underlying mutability setting of an Address based on the Program configuration and the MemoryBlock. Ignore any overrides of Data at the address.
    Parameters:
      `addr` - is the Address
      `program` - is the Program containing the Address
    Returns:
      the mutability