Package ghidra.trace.database.stack

# 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

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface ghidra.trace.database.target.DBTraceObjectInterface

  `DBTraceObjectInterface.Translator<T>`

- ## Field Summary

  ### Fields inherited from interface ghidra.trace.model.target.iface.TraceObjectInterface

  `KEY_COMMENT, KEY_DISPLAY, KEY_KIND, KEY_MODIFIED, KEY_ORDER, KEY_SHORT_DISPLAY, KEY_TYPE, KEY_VALUE`

  ### Fields inherited from interface ghidra.trace.model.stack.TraceStackFrame

  `KEY_PC`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DBTraceStackFrame(DBTraceObject object)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected boolean`
  `changeApplies(TraceChangeRecord<?,?> rec)`
  `protected TraceChangeRecord<?,?>`
  `createChangeRecord()`
  `String`
  `getComment(long snap)`
  Get the user comment for the frame
  `int`
  `getLevel()`
  Get the frame's position in the containing stack
  `TraceObject`
  `getObject()`
  Get the object backing this implementation
  `Address`
  `getProgramCounter(long snap)`
  Get the program counter at the given snap
  `TraceStack`
  `getStack()`
  Get the containing stack
  `Trace`
  `getTrace()`
  Get the trace containing this frame
  `void`
  `setComment(long snap, String comment)`
  Set the user comment for the frame
  `void`
  `setProgramCounter(Lifespan span, Address pc)`
  Set the program counter over the given span
  `TraceChangeRecord<?,?>`
  `translateEvent(TraceChangeRecord<?,?> rec)`
  Translate an object event into the interface-specific event

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface ghidra.trace.database.target.DBTraceObjectInterface

  `getObjectKey, isDeleted, spaceForValue`

- ## 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`