Class DBTraceThread

java.lang.Object
ghidra.trace.database.thread.DBTraceThread
All Implemented Interfaces:
DBTraceObjectInterface, TraceObjectInterface, TraceThread, TraceUniqueObject

public class DBTraceThread extends Object implements TraceThread, DBTraceObjectInterface
  • Constructor Details

  • Method Details

    • getObject

      public DBTraceObject getObject()
      Description copied from interface: TraceObjectInterface
      Get the object backing this implementation
      Specified by:
      getObject in interface TraceObjectInterface
      Returns:
      the object
    • getTrace

      public Trace getTrace()
      Description copied from interface: TraceThread
      Get the trace containing this thread
      Specified by:
      getTrace in interface TraceThread
      Returns:
      the trace
    • getKey

      public long getKey()
      Description copied from interface: TraceThread
      Get a key identifying this thread, unique among all threads in this trace for all time
      Specified by:
      getKey in interface TraceThread
      Returns:
      the key
    • getPath

      public String getPath()
      Description copied from interface: TraceThread
      Get the "full name" of this thread
      Specified by:
      getPath in interface TraceThread
      Returns:
      the path
    • getName

      public String getName(long snap)
      Description copied from interface: TraceThread
      Get the "short name" of this thread
      Specified by:
      getName in interface TraceThread
      Parameters:
      snap - the snap
      Returns:
      the name
    • setName

      public void setName(Lifespan lifespan, String name)
      Description copied from interface: TraceThread
      Set the "short name" of this thread
      Specified by:
      setName in interface TraceThread
      Parameters:
      lifespan - the span of time
      name - the name
    • setName

      public void setName(long snap, String name)
      Description copied from interface: TraceThread
      Set the "short name" of this thread
      Specified by:
      setName in interface TraceThread
      Parameters:
      snap - the starting snap
      name - the name
    • setComment

      public void setComment(long snap, String comment)
      Description copied from interface: TraceThread
      Set a comment on this thread
      Specified by:
      setComment in interface TraceThread
      Parameters:
      snap - the snap
      comment - the comment, possibly null
    • getComment

      public String getComment(long snap)
      Description copied from interface: TraceThread
      Get the comment on this thread
      Specified by:
      getComment in interface TraceThread
      Parameters:
      snap - the snap
      Returns:
      the comment, possibly null
    • delete

      public void delete()
      Description copied from interface: TraceThread
      Delete this thread from the trace
      Specified by:
      delete in interface TraceThread
    • remove

      public void remove(long snap)
      Description copied from interface: TraceThread
      Remove this thread from the given snapshot on
      Specified by:
      remove in interface TraceThread
      Parameters:
      snap - the snapshot key
    • isValid

      public boolean isValid(long snap)
      Description copied from interface: TraceThread
      Check if the thread is valid at the given snapshot

      In object mode, a thread's life may be disjoint, so checking if the snap occurs between creation and destruction is not quite sufficient. This method encapsulates validity. In object mode, it checks that the thread object has a canonical parent at the given snapshot. In table mode, it checks that the lifespan contains the snap.

      Specified by:
      isValid in interface TraceThread
      Parameters:
      snap - the snapshot key
      Returns:
      true if valid, false if not
    • isAlive

      public boolean isAlive(Lifespan span)
      Description copied from interface: TraceThread
      Check if the module is alive for any of the given span
      Specified by:
      isAlive in interface TraceThread
      Parameters:
      span - the span
      Returns:
      true if its life intersects the span
    • translateEvent

      public TraceChangeRecord<?,?> translateEvent(TraceChangeRecord<?,?> rec)
      Description copied from interface: DBTraceObjectInterface
      Translate an object event into the interface-specific event

      Both the object event and the interface-specific event, if applicable, will be emitted. If multiple events need to be emitted, then this method may emit them directly via its object's trace. If exactly one event needs to be emitted, then this method should return the translated record. If no translation applies, or if the translated event(s) were emitted directly, this method returns null.

      Specified by:
      translateEvent in interface DBTraceObjectInterface
      Parameters:
      rec - the object event
      Returns:
      the interface-specific event to emit, or null