Package ghidra.pcode.exec.trace.data
Class AbstractPcodeTraceAccess<S extends PcodeTraceMemoryAccess,L extends PcodeTraceRegistersAccess>
java.lang.Object
ghidra.pcode.exec.trace.data.AbstractPcodeTraceAccess<S,L>
- Type Parameters:
S- the type of shared data-access shims providedL- the type of thread-local data-access shims provided
- All Implemented Interfaces:
PcodeTraceAccess
- Direct Known Subclasses:
DefaultPcodeTraceAccess
public abstract class AbstractPcodeTraceAccess<S extends PcodeTraceMemoryAccess,L extends PcodeTraceRegistersAccess>
extends Object
implements PcodeTraceAccess
An abstract implementation of
PcodeTraceAccess-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<org.apache.commons.lang3.tuple.Pair<TraceThread, Integer>, L> protected Sprotected final TracePlatformprotected final longprotected final longprotected final TraceTimeViewport -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPcodeTraceAccess(TracePlatform platform, long snap) Construct a shimAbstractPcodeTraceAccess(TracePlatform platform, long snap, long threadsSnap) Construct a shim -
Method Summary
Modifier and TypeMethodDescriptiongetDataForLocalState(PcodeThread<?> thread, int frame) Get the data-access shim for use in an emulator thread's local stategetDataForLocalState(TraceThread thread, int frame) Get the data-access shim for use in an emulator thread's local stateGet the data-access shim for use in an emulator's shared stateGet the language of the associated platformprotected TracegetTrace()Get the associated traceprotected TraceThreadgetTraceThread(PcodeThread<?> thread) Get the trace thread conventionally associated with the given p-code threadprotected abstract LnewDataForLocalState(TraceThread thread, int frame) Factory method for a thread's local data-access shimprotected abstract SFactory method for the shared data-access shimMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.pcode.exec.trace.data.PcodeTraceAccess
deriveForWrite, getDataForThreadState, newPcodeTraceThreadAccess
-
Field Details
-
platform
-
threadsSnap
protected final long threadsSnap -
snap
protected final long snap -
viewport
-
dataForLocalStateByThreadAndFrame
protected final Map<org.apache.commons.lang3.tuple.Pair<TraceThread,Integer>, dataForLocalStateByThreadAndFrameL extends PcodeTraceRegistersAccess>
-
-
Constructor Details
-
AbstractPcodeTraceAccess
Construct a shim- Parameters:
platform- the associated platformsnap- the associated snapthreadsSnap- the snap to use when finding associated threads between trace and emulator
-
AbstractPcodeTraceAccess
Construct a shim- Parameters:
platform- the associated platformsnap- the associated snap
-
-
Method Details
-
getTrace
Get the associated trace- Returns:
- the trace
-
getTraceThread
Get the trace thread conventionally associated with the given p-code threadA p-code thread is conventionally associated with the trace thread whose path matches the p-code thread's name.
- Parameters:
thread- the p-code thread- Returns:
- the trace thread
-
getLanguage
Description copied from interface:PcodeTraceAccessGet the language of the associated platform- Specified by:
getLanguagein interfacePcodeTraceAccess- Returns:
- the langauge
-
newDataForLocalState
Factory method for a thread's local data-access shim- Parameters:
thread- the associated trace threadframe- the frame, usually 0- Returns:
- the new data-access shim
-
getDataForLocalState
Description copied from interface:PcodeTraceAccessGet the data-access shim for use in an emulator thread's local state- Specified by:
getDataForLocalStatein interfacePcodeTraceAccess- Parameters:
thread- the trace thread associated with the emulator's threadframe- the frame, usually 0- Returns:
- the shim
-
getDataForLocalState
Description copied from interface:PcodeTraceAccessGet the data-access shim for use in an emulator thread's local state- Specified by:
getDataForLocalStatein interfacePcodeTraceAccess- Parameters:
thread- the emulator's threadframe- the frame, usually 0- Returns:
- the shim
-