Class TaintSpace
This is the actual implementation of the in-memory storage for taint marks. For a stand-alone
emulator, this is the full state. For a trace- or Debugger-integrated emulator, this is a cache
of taints loaded from a trace backing this emulator. (See TaintPieceHandler.) Most
likely, that trace is the user's current trace.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TaintPcodeExecutorStatePieceprotected final AddressSpaceprotected final NavigableMap<Long, TaintSet> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()get(long offset, int size, PcodeStateCallbacks cb) Retrieve the taint sets for the variable at the given offsetvoidgetInto(long offset, TaintVec buf, PcodeStateCallbacks cb) Retrieve the taint sets for the variable at the given offsetgetNextEntry(long offset) getRegisterValues(List<Register> registers) voidset(long offset, TaintVec val, PcodeStateCallbacks cb) Mark the variable at offset with the given taint sets
-
Field Details
-
space
-
piece
-
taints
-
-
Constructor Details
-
TaintSpace
-
-
Method Details
-
set
Mark the variable at offset with the given taint setsThis marks possibly several offsets, starting at the given offset. The first taint set in the vector is used to mark the given offset, then each subsequent set marks each subsequent offset. This is analogous to the manner in which bytes would be "written" from a source array into concrete state, starting at a given offset.
- Parameters:
offset- the starting offsetval- the vector of taint setscb- callbacks to receive emulation events
-
getInto
Retrieve the taint sets for the variable at the given offsetThis retrieves as many taint sets as there are elements in the given buffer vector. The first element becomes the taint set at the given offset, then each subsequent element becomes the taint set at each subsequent offset until the vector is filled. This is analogous to the manner in which bytes would be "read" from concrete state, starting at a given offset, into a destination array.
- Parameters:
offset- the offsetbuf- the vector to receive taint setscb- callbacks to receive emulation events
-
get
Retrieve the taint sets for the variable at the given offsetThis works the same as
getInto(long, TaintVec, PcodeStateCallbacks), but creates a new vector of the given size, reads the taint sets, and returns the vector.- Parameters:
offset- the offsetsize- the size of the variablecb- callbacks to receive emulation events- Returns:
- the taint vector for that variable
-
clear
public void clear() -
getRegisterValues
-
getNextEntry
-