Package ghidra.pcode.memstate
Class UniqueMemoryBank
java.lang.Object
ghidra.pcode.memstate.MemoryBank
ghidra.pcode.memstate.UniqueMemoryBank
An subclass of
MemoryBank intended for modeling the "unique" memory
space. The space is byte-addressable and paging is not supported.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA simple class representing a byte-addressable word of memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected MapSTL<Long,UniqueMemoryBank.WordInfo> A map fromLongoffsets to byte values would require many lookups.Fields inherited from class ghidra.pcode.memstate.MemoryBank
faultHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear unique storage at the start of an instructionintgetChunk(long offset, int size, byte[] dest, boolean stopOnUninitialized) protected MemoryPagegetPage(long addr) voidsetChunk(long offset, int size, byte[] src) protected voidsetPage(long addr, byte[] val, int skip, int size, int bufOffset) protected voidsetPageInitialized(long addr, boolean initialized, int skip, int size, int bufOffset) Methods inherited from class ghidra.pcode.memstate.MemoryBank
constructValue, deconstructValue, getInitializedMaskSize, getMemoryFaultHandler, getPageSize, getSpace, isBigEndian, setInitialized
-
Field Details
-
map
A map fromLongoffsets to byte values would require many lookups. As an optimization, this map is defined fromLongvalues toUniqueMemoryBank.WordInfoobjects, each of which represents an eight-byte word of memory. Each key in this map must be 0 mod 8.
-
-
Constructor Details
-
UniqueMemoryBank
-
-
Method Details
-
getPage
- Specified by:
getPagein classMemoryBank
-
setPage
protected void setPage(long addr, byte[] val, int skip, int size, int bufOffset) - Specified by:
setPagein classMemoryBank
-
setPageInitialized
protected void setPageInitialized(long addr, boolean initialized, int skip, int size, int bufOffset) - Specified by:
setPageInitializedin classMemoryBank
-
getChunk
public int getChunk(long offset, int size, byte[] dest, boolean stopOnUninitialized) - Overrides:
getChunkin classMemoryBank
-
setChunk
public void setChunk(long offset, int size, byte[] src) - Overrides:
setChunkin classMemoryBank
-
clear
public void clear()Clear unique storage at the start of an instruction
-