Class DBTraceStackFrame

java.lang.Object
ghidra.trace.database.stack.DBTraceStackFrame
All Implemented Interfaces:
DBTraceObjectInterface, TraceStackFrame, TraceObjectInterface, TraceUniqueObject

public class DBTraceStackFrame extends Object implements TraceStackFrame, DBTraceObjectInterface
  • Constructor Details

    • DBTraceStackFrame

      public DBTraceStackFrame(DBTraceObject object)
  • Method Details

    • getTrace

      public Trace getTrace()
      Description copied from interface: TraceStackFrame
      Get the trace containing this frame
      Specified by:
      getTrace in interface TraceStackFrame
      Returns:
      the trace
    • getStack

      public TraceStack getStack()
      Description copied from interface: TraceStackFrame
      Get the containing stack
      Specified by:
      getStack in interface TraceStackFrame
      Returns:
      the stack
    • getLevel

      public int getLevel()
      Description copied from interface: TraceStackFrame
      Get the frame's position in the containing stack

      0 represents the innermost frame or top of the stack.

      Specified by:
      getLevel in interface TraceStackFrame
      Returns:
      the frame's level
    • getProgramCounter

      public Address getProgramCounter(long snap)
      Description copied from interface: TraceStackFrame
      Get the program counter at the given snap
      Specified by:
      getProgramCounter in interface TraceStackFrame
      Parameters:
      snap - the snap (only relevant in the experimental objects mode. Ordinarily, the PC is fixed over the containing stack's lifetime)
      Returns:
      the program counter
    • setProgramCounter

      public void setProgramCounter(Lifespan span, Address pc)
      Description copied from interface: TraceStackFrame
      Set the program counter over the given span
      Specified by:
      setProgramCounter in interface TraceStackFrame
      Parameters:
      span - the span (only relevant in the experimental objects mode. Ordinarily, the PC is fixed over the containing stack's lifetime)
      pc - the program counter
    • getComment

      public String getComment(long snap)
      Description copied from interface: TraceStackFrame
      Get the user comment for the frame

      In the experimental objects mode, this actually gets the comment in the listing at the frame's program counter for the given snap.

      Specified by:
      getComment in interface TraceStackFrame
      Parameters:
      snap - the snap (only relevant in the experimental objects mode)
      Returns:
      the (nullable) comment
    • setComment

      public void setComment(long snap, String comment)
      Description copied from interface: TraceStackFrame
      Set the user comment for the frame

      In the experimental objects mode, this actually sets the comment in the listing at the frame's program counter for the given snap.

      Specified by:
      setComment in interface TraceStackFrame
      Parameters:
      snap - the snap (only relevant in the experimental objects mode)
      comment - the (nullable) comment
    • getObject

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

      protected boolean changeApplies(TraceChangeRecord<?,?> rec)
    • createChangeRecord

      protected TraceChangeRecord<?,?> createChangeRecord()
    • 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