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 provided
L - 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 Details

  • Constructor Details

    • AbstractPcodeTraceAccess

      public AbstractPcodeTraceAccess(TracePlatform platform, long snap, long threadsSnap)
      Construct a shim
      Parameters:
      platform - the associated platform
      snap - the associated snap
      threadsSnap - the snap to use when finding associated threads between trace and emulator
    • AbstractPcodeTraceAccess

      public AbstractPcodeTraceAccess(TracePlatform platform, long snap)
      Construct a shim
      Parameters:
      platform - the associated platform
      snap - the associated snap
  • Method Details

    • getTrace

      protected Trace getTrace()
      Get the associated trace
      Returns:
      the trace
    • getTraceThread

      protected TraceThread getTraceThread(PcodeThread<?> thread)
      Get the trace thread conventionally associated with the given p-code thread

      A 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

      public Language getLanguage()
      Description copied from interface: PcodeTraceAccess
      Get the language of the associated platform
      Specified by:
      getLanguage in interface PcodeTraceAccess
      Returns:
      the langauge
    • newDataForSharedState

      protected abstract S newDataForSharedState()
      Factory method for the shared data-access shim
      Returns:
      the new data-access shim
    • getDataForSharedState

      public S getDataForSharedState()
      Description copied from interface: PcodeTraceAccess
      Get the data-access shim for use in an emulator's shared state
      Specified by:
      getDataForSharedState in interface PcodeTraceAccess
      Returns:
      the shim
    • newDataForLocalState

      protected abstract L newDataForLocalState(TraceThread thread, int frame)
      Factory method for a thread's local data-access shim
      Parameters:
      thread - the associated trace thread
      frame - the frame, usually 0
      Returns:
      the new data-access shim
    • getDataForLocalState

      public L getDataForLocalState(TraceThread thread, int frame)
      Description copied from interface: PcodeTraceAccess
      Get the data-access shim for use in an emulator thread's local state
      Specified by:
      getDataForLocalState in interface PcodeTraceAccess
      Parameters:
      thread - the trace thread associated with the emulator's thread
      frame - the frame, usually 0
      Returns:
      the shim
    • getDataForLocalState

      public L getDataForLocalState(PcodeThread<?> thread, int frame)
      Description copied from interface: PcodeTraceAccess
      Get the data-access shim for use in an emulator thread's local state
      Specified by:
      getDataForLocalState in interface PcodeTraceAccess
      Parameters:
      thread - the emulator's thread
      frame - the frame, usually 0
      Returns:
      the shim