Package ghidra.pcode.exec.trace
Enum Class TraceEmulationIntegration
- All Implemented Interfaces:
Serializable,Comparable<TraceEmulationIntegration>,Constable
A collection of static methods for integrating an emulator with a trace.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn abstract implementation ofTraceEmulationIntegration.PieceHandlerthat seeks to simplify integration of abstract domains where the state is serialized into a trace's property map.static classA misguided simplification ofTraceEmulationIntegration.AbstractPropertyBasedPieceHandlerthat reduces the requirement to a simple codec.static classA handler that implements the lazy-read-writer-later pattern of trace integration for a concrete emulator's bytes.static classA handler that implements the lazy-read-write-immediately pattern of trace integration for a concrete emulator's bytes.static interfaceThe handler for a specific piece within an emulator's (or executor's) state.static classThe implementation ofTraceEmulationIntegration.Writerfor traces.static interfaceThe primary mechanism for integrating emulators and tracesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Method Summary
Modifier and TypeMethodDescriptionCreate a writer (callbacks) that lazily loads data from the given access shim.bytesImmediateWrite(PcodeTraceAccess access) Create a writer (callbacks) that lazily loads data and immediately writes changes to the given access shim.static PcodeStateCallbacksbytesImmediateWrite(PcodeTraceAccess access, TraceThread thread, int frame) Create state callbacks that lazily load data and immediately write changes to the given access shim.static TraceEmulationIntegrationReturns the enum constant of this class with the specified name.static TraceEmulationIntegration[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
bytesDelayedWrite
Create a writer (callbacks) that lazily loads data from the given access shim.Writes are logged, but not written to the trace. Instead, the client should call
TraceEmulationIntegration.Writer.writeDown(PcodeTraceAccess)to write the logged changes to another given snapshot. This is used for forking emulation from a chosen snapshot and saving the results into (usually scratch) snapshots. Scripts might also use this pattern to save a series of snapshots resulting from an emulation experiment.- Parameters:
from- the access shim for lazy loads- Returns:
- the writer
-
bytesImmediateWrite
Create a writer (callbacks) that lazily loads data and immediately writes changes to the given access shim.Writes are immediately stored into the trace at the same snapshot as state is sourced.
- Parameters:
access- the access shim for loads and stores- Returns:
- the writer
-
bytesImmediateWrite
public static PcodeStateCallbacks bytesImmediateWrite(PcodeTraceAccess access, TraceThread thread, int frame) Create state callbacks that lazily load data and immediately write changes to the given access shim.Writes are immediately stored into the trace at the same snapshot as state is sourced.
Use this instead of
bytesImmediateWrite(PcodeTraceAccess)when interfacing directly with aPcodeExecutorStatevice aPcodeEmulator.- Parameters:
access- the access shim for loads and storesthread- the trace thread for register accessesframe- the frame for register accesses, usually 0- Returns:
- the callbacks
-