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
Modifier and TypeClassDescriptionstatic class
A simple class representing a byte-addressable word of memory. -
Field Summary
Modifier and TypeFieldDescriptionprotected MapSTL
<Long, UniqueMemoryBank.WordInfo> A map fromLong
offsets to byte values would require many lookups.Fields inherited from class ghidra.pcode.memstate.MemoryBank
faultHandler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear unique storage at the start of an instructionint
getChunk
(long offset, int size, byte[] dest, boolean stopOnUninitialized) protected MemoryPage
getPage
(long addr) void
setChunk
(long offset, int size, byte[] src) protected void
setPage
(long addr, byte[] val, int skip, int size, int bufOffset) protected void
setPageInitialized
(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 fromLong
offsets to byte values would require many lookups. As an optimization, this map is defined fromLong
values toUniqueMemoryBank.WordInfo
objects, 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:
getPage
in classMemoryBank
-
setPage
protected void setPage(long addr, byte[] val, int skip, int size, int bufOffset) - Specified by:
setPage
in classMemoryBank
-
setPageInitialized
protected void setPageInitialized(long addr, boolean initialized, int skip, int size, int bufOffset) - Specified by:
setPageInitialized
in classMemoryBank
-
getChunk
public int getChunk(long offset, int size, byte[] dest, boolean stopOnUninitialized) - Overrides:
getChunk
in classMemoryBank
-
setChunk
public void setChunk(long offset, int size, byte[] src) - Overrides:
setChunk
in classMemoryBank
-
clear
public void clear()Clear unique storage at the start of an instruction
-