Package ghidra.pcode.memstate
Class UniqueMemoryBank.WordInfo
java.lang.Object
ghidra.pcode.memstate.UniqueMemoryBank.WordInfo
- Enclosing class:
UniqueMemoryBank
A simple class representing a byte-addressable word of memory. Each
byte can be either initialized to a byte value or uninitialized.
It is an error to attempt to read an uninitialized byte.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionWordInfo()
Constructs aUniqueMemoryBank.WordInfo
object with all bytes uninitialized. -
Method Summary
Modifier and TypeMethodDescriptionbyte
getByte
(int index) Returns the byte at the given indexvoid
getWord
(byte[] buffer) Writes an entire word intobuffer
protected boolean
Returns true precisely when the entire word is initialized.void
setByte
(byte val, int index) Initializes the byte atindex
and sets its value toval
-
Field Details
-
initialized
public byte initialized -
word
public long word
-
-
Constructor Details
-
WordInfo
public WordInfo()Constructs aUniqueMemoryBank.WordInfo
object with all bytes uninitialized.
-
-
Method Details
-
setByte
public void setByte(byte val, int index) Initializes the byte atindex
and sets its value toval
- Parameters:
val
- new valueindex
- index- Throws:
LowlevelError
- if the index is invalid
-
getByte
public byte getByte(int index) Returns the byte at the given index- Parameters:
index
- index- Returns:
- corresponding byte value
- Throws:
LowlevelError
- if the index is invalid or the requested byte is not initialized.
-
getWord
public void getWord(byte[] buffer) Writes an entire word intobuffer
- Parameters:
buffer
- buffer to write a single word to. Must have length 8.- Throws:
LowlevelError
- if the entire word is not initialized
-
isEntireWordInitialized
protected boolean isEntireWordInitialized()Returns true precisely when the entire word is initialized.- Returns:
- true if entire work initialized
-