Package ghidra.pcode.memstate
Class AbstractMemoryState
java.lang.Object
ghidra.pcode.memstate.AbstractMemoryState
- All Implemented Interfaces:
MemoryState
- Direct Known Subclasses:
AdaptedMemoryState,DefaultMemoryState
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal BigIntegergetBigInteger(AddressSpace spc, long off, int size, boolean signed) This is the main interface for reading values from the MemoryState.final BigIntegergetBigInteger(Register reg) A convenience method for reading a value directly from a register rather than querying for the offset and spacefinal BigIntegergetBigInteger(Varnode vn, boolean signed) A convenience method for reading a value directly from a varnode rather than querying for the offset and spacefinal BigIntegergetBigInteger(String nm) This is a convenience method for reading registers by name.final longgetValue(AddressSpace spc, long off, int size) This is the main interface for reading values from the MemoryState.final longA convenience method for reading a value directly from a register rather than querying for the offset and spacefinal longA convenience method for reading a value directly from a varnode rather than querying for the offset and spacefinal longThis is a convenience method for reading registers by name.final voidsetValue(AddressSpace spc, long off, int size, long cval) This is the main interface for writing values to the MemoryState.final voidsetValue(AddressSpace spc, long off, int size, BigInteger cval) This is the main interface for writing values to the MemoryState.final voidA convenience method for setting a value directly on a register rather than breaking out the componentsfinal voidsetValue(Register reg, BigInteger cval) A convenience method for setting a value directly on a register rather than breaking out the componentsfinal voidA convenience method for setting a value directly on a varnode rather than breaking out the componentsfinal voidsetValue(Varnode vn, BigInteger cval) A convenience method for setting a value directly on a varnode rather than breaking out the componentsfinal voidThis is a convenience method for setting registers by name.final voidsetValue(String nm, BigInteger cval) This is a convenience method for setting registers by name.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.pcode.memstate.MemoryState
getChunk, getMemoryBank, setChunk, setInitialized, setMemoryBank
-
Constructor Details
-
AbstractMemoryState
-
-
Method Details
-
setValue
A convenience method for setting a value directly on a varnode rather than breaking out the components- Specified by:
setValuein interfaceMemoryState- Parameters:
vn- the varnode location to be writtencval- the value to write into the varnode location
-
setValue
A convenience method for setting a value directly on a register rather than breaking out the components- Specified by:
setValuein interfaceMemoryState- Parameters:
reg- the register location to be writtencval- the value to write into the register location
-
setValue
This is a convenience method for setting registers by name. Any register name known to the language can be used as a write location. The associated address space, offset, and size is looked up and automatically passed to the main setValue routine.- Specified by:
setValuein interfaceMemoryState- Parameters:
nm- is the name of the registercval- is the value to write to the register
-
setValue
This is the main interface for writing values to the MemoryState. If there is no registered MemoryBank for the desired address space, or if there is some other error, an exception is thrown.- Specified by:
setValuein interfaceMemoryState- Parameters:
spc- is the address space to write tooff- is the offset where the value should be writtensize- is the number of bytes to be writtencval- is the value to be written
-
getValue
A convenience method for reading a value directly from a varnode rather than querying for the offset and space- Specified by:
getValuein interfaceMemoryState- Parameters:
vn- the varnode location to be read- Returns:
- the value read from the varnode location
-
getValue
A convenience method for reading a value directly from a register rather than querying for the offset and space- Specified by:
getValuein interfaceMemoryState- Parameters:
reg- the register location to be read- Returns:
- the value read from the register location
-
getValue
This is a convenience method for reading registers by name. any register name known to the language can be used as a read location. The associated address space, offset, and size is looked up and automatically passed to the main getValue routine.- Specified by:
getValuein interfaceMemoryState- Parameters:
nm- is the name of the register- Returns:
- the value associated with that register
-
getValue
This is the main interface for reading values from the MemoryState. If there is no registered MemoryBank for the desired address space, or if there is some other error, an exception is thrown.- Specified by:
getValuein interfaceMemoryState- Parameters:
spc- is the address space being queriedoff- is the offset of the value being queriedsize- is the number of bytes to query- Returns:
- the queried value
-
setValue
A convenience method for setting a value directly on a varnode rather than breaking out the components- Specified by:
setValuein interfaceMemoryState- Parameters:
vn- the varnode location to be writtencval- the value to write into the varnode location
-
setValue
A convenience method for setting a value directly on a register rather than breaking out the components- Specified by:
setValuein interfaceMemoryState- Parameters:
reg- the register location to be writtencval- the value to write into the register location
-
setValue
This is a convenience method for setting registers by name. Any register name known to the language can be used as a write location. The associated address space, offset, and size is looked up and automatically passed to the main setValue routine.- Specified by:
setValuein interfaceMemoryState- Parameters:
nm- is the name of the registercval- is the value to write to the register
-
setValue
This is the main interface for writing values to the MemoryState. If there is no registered MemoryBank for the desired address space, or if there is some other error, an exception is thrown.- Specified by:
setValuein interfaceMemoryState- Parameters:
spc- is the address space to write tooff- is the offset where the value should be writtensize- is the number of bytes to be writtencval- is the value to be written
-
getBigInteger
A convenience method for reading a value directly from a varnode rather than querying for the offset and space- Specified by:
getBigIntegerin interfaceMemoryState- Parameters:
vn- the varnode location to be readsigned- true if signed value should be returned, false for unsigned value- Returns:
- the unsigned value read from the varnode location
-
getBigInteger
A convenience method for reading a value directly from a register rather than querying for the offset and space- Specified by:
getBigIntegerin interfaceMemoryState- Parameters:
reg- the register location to be read- Returns:
- the unsigned value read from the register location
-
getBigInteger
This is a convenience method for reading registers by name. any register name known to the language can be used as a read location. The associated address space, offset, and size is looked up and automatically passed to the main getValue routine.- Specified by:
getBigIntegerin interfaceMemoryState- Parameters:
nm- is the name of the register- Returns:
- the unsigned value associated with that register
-
getBigInteger
This is the main interface for reading values from the MemoryState. If there is no registered MemoryBank for the desired address space, or if there is some other error, an exception is thrown.- Specified by:
getBigIntegerin interfaceMemoryState- Parameters:
spc- is the address space being queriedoff- is the offset of the value being queriedsize- is the number of bytes to querysigned- true if signed value should be returned, false for unsigned value- Returns:
- the queried unsigned value
-