Class UniqueMemoryBank


  • public class UniqueMemoryBank
    extends MemoryBank
    An subclass of MemoryBank intended for modeling the "unique" memory space. The space is byte-addressable and paging is not supported.
    • Field Detail

      • map MODIFIED

        type: MapSTL → MapSTL
        -generic.stl.MapSTL<java.lang.Long,byte[]> map
        +generic.stl.MapSTL<java.lang.Long,ghidra.pcode.memstate.UniqueMemoryBank.WordInfo> map
        protected MapSTL<java.lang.Long,​UniqueMemoryBank.WordInfo> map
        A map from Long offsets to byte values would require many lookups. As an optimization, this map is defined from Long values to UniqueMemoryBank.WordInfo objects, each of which represents an eight-byte word of memory. Each key in this map must be 0 mod 8.

Constructor Detail

  • Method Detail

    • setPage

      protected void setPage​(long addr,
                             byte[] val,
                             int skip,
                             int size,
                             int bufOffset)
      Specified by:
      setPage in class MemoryBank
    • setPageInitialized

      protected void setPageInitialized​(long addr,
                                        boolean initialized,
                                        int skip,
                                        int size,
                                        int bufOffset)
      Specified by:
      setPageInitialized in class MemoryBank
    • getChunk MODIFIED

      param 1 renamed: addrOffset → offset; param 3 renamed: res → dest; param 4 renamed: ignoreFault → stopOnUninitialized
      -int getChunk(long addrOffset, int size, byte[] res, boolean ignoreFault)
      +int getChunk(long offset, int size, byte[] dest, boolean stopOnUninitialized)
      public int getChunk​(long offset,
                          int size,
                          byte[] dest,
                          boolean stopOnUninitialized)
      Overrides:
      getChunk in class MemoryBank
    • setChunk MODIFIED

      param 3 renamed: val → src
      -void setChunk(long offset, int size, byte[] val)
      +void setChunk(long offset, int size, byte[] src)
      public void setChunk​(long offset,
                           int size,
                           byte[] src)
      Overrides:
      setChunk in class MemoryBank
    • clear

      public void clear()
      Clear unique storage at the start of an instruction