Interface TraceStack

All Superinterfaces:
TraceObjectInterface, TraceUniqueObject
All Known Implementing Classes:
DBTraceStack

public interface TraceStack extends TraceUniqueObject, TraceObjectInterface
A trace of the connected debugger's stack unwind

Most of the information stored here is ancillary, since with sufficient analysis of associated images, it could be recovered, in the same fashion as the connected debugger did. Nevertheless, during a debug session, this information should be recorded if offered, as it makes it immediately accessible, before sufficient analysis has been performed, and provides some check for that analysis. If this information wasn't recorded during a session, this can store the result of that analysis.

Conventionally, if the debugger can also unwind register values, then each frame should present a register bank. Otherwise, the same object presenting this stack should present the register bank.

  • Method Details

    • getThread

      TraceThread getThread()
      Get the thread whose stack this is
      Returns:
      the thread
    • getDepth

      int getDepth(long snap)
      Get the depth (as recorded) of this stack
      Parameters:
      snap - the snap
      Returns:
      the depth
    • setDepth

      void setDepth(long snap, int depth, boolean atInner)
      Set the depth of the stack by adding or deleting frames to or from the specified end

      Note that pushing new frames onto a stack does not adjust the frame level of any frame-associated managers or spaces, e.g., that returned by TraceMemoryManager.getMemoryRegisterSpace(TraceThread, int, boolean).

      If the experimental object mode is successful, this method should be deleted.

      Parameters:
      snap - the snap
      depth - the desired depth
      atInner - true if frames should be "pushed"
    • getFrame

      TraceStackFrame getFrame(long snap, int level, boolean ensureDepth)
      Get the frame at the given level
      Parameters:
      snap - the snap
      level - the level, where 0 indicates the inner-most frame.
      ensureDepth - true to expand the depth to accomodate the requested frame
      Returns:
      the frame, or null if level exceeds the depth without ensureDepth set
      Throws:
      IndexOutOfBoundsException - if the level is negative
    • getFrames

      List<TraceStackFrame> getFrames(long snap)
      Get all (known) frames in this stack
      Parameters:
      snap - the snap (only relevant in the experimental objects mode. Ordinarily, the frames are fixed over the stack's lifetime)
      Returns:
      the list of frames
    • delete

      void delete()
      Delete this stack and its frames
    • remove

      void remove(long snap)
      Remove this stack and its frame rom the given snapshot on
      Parameters:
      snap - the snapshot key
    • isValid

      boolean isValid(long snap)
      Check if this stack is valid at the given snap
      Parameters:
      snap - the snap
      Returns:
      true if valid
    • hasFixedFrames

      boolean hasFixedFrames()
      Check if this stack'sframes are fixed for its lifetime

      This is a transitional method, since the experimental objects mode breaks with the normal stack/frame model. Essentially, this returns true if the normal model is being used, and false if the object-based model is being used.

      Returns:
      true if fixed, false if object-based (dynamic)