Interface TraceSymbol

All Superinterfaces:
Symbol
All Known Subinterfaces:
TraceClassSymbol, TraceLabelSymbol, TraceNamespaceSymbol, TraceSymbolWithLifespan
All Known Implementing Classes:
AbstractDBTraceSymbol, DBTraceClassSymbol, DBTraceLabelSymbol, DBTraceNamespaceSymbol

public interface TraceSymbol extends Symbol
A trace symbol.

This is essentially the equivalent concept of Symbol from a Program. One important distinction is that in the trace implementation, the symbol and the object it describes are the same. For example, in a Program, a Namespace and its symbol are two different things. To get the namespace, you would invoke Symbol.getObject(). That is unnecessary, though permissible, with a trace, because TraceNamespaceSymbol extends from both Namespace and Symbol.

  • Method Details

    • getTrace

      Trace getTrace()
      Get the trace to which this symbol belongs.
      Returns:
      the trace
    • getThread

      TraceThread getThread()
      If in register space, get the thread associated with this symbol.
      Returns:
      the thread
    • getParentNamespace

      TraceNamespaceSymbol getParentNamespace()
      Description copied from interface: Symbol
      Return the parent namespace for this symbol.
      Specified by:
      getParentNamespace in interface Symbol
      Returns:
      the namespace that contains this symbol.
    • getParentSymbol

      TraceNamespaceSymbol getParentSymbol()
      Description copied from interface: Symbol
      Returns namespace symbol of the namespace containing this symbol
      Specified by:
      getParentSymbol in interface Symbol
      Returns:
      parent namespace symbol
    • getReferences

      TraceReference[] getReferences(TaskMonitor monitor)
      Returns all memory references to the address of this symbol. If you do not have a TaskMonitor instance, then you can pass TaskMonitor.DUMMY or null. For traces, getReferenceCollection() is preferred, as it will retrieve the references lazily.
      Specified by:
      getReferences in interface Symbol
      Parameters:
      monitor - the monitor that is used to report progress and to cancel this potentially long-running call
      Returns:
      all memory references to the address of this symbol.
    • getReferenceCollection

      Collection<? extends TraceReference> getReferenceCollection()
      Get all memory references to the address of this symbol.
      Returns:
      the references
    • getReferences

      TraceReference[] getReferences()
      Returns all memory references to the address of this symbol. For traces, getReferenceCollection() is preferred, as it will retrieve the references lazily.
      Specified by:
      getReferences in interface Symbol
      Returns:
      all memory references to the address of this symbol
      See Also:
    • setPinned

      void setPinned(boolean pinned)

      Sets whether or not this symbol is pinned to its associated address.

      If the symbol is pinned then moving or removing the memory associated with its address will not cause this symbol to be removed and will not cause its address to change. If the symbol is not pinned, then removing the memory at its address will also remove this symbol.

      Likewise, moving a memory block containing a symbol that is not anchored will change the address for that symbol to keep it associated with the same byte in the memory block.

      Traces do not support moving memory, so pinning is meaningless and unsupported.
      Specified by:
      setPinned in interface Symbol
      Parameters:
      pinned - true indicates this symbol is anchored to its address. false indicates this symbol is not anchored to its address.
    • isPinned

      boolean isPinned()
      Returns true if the symbol is pinned to its current address. If it is pinned, then moving or removing the memory associated with that address will not affect this symbol. Traces do not support moving memory, so pinning is meaningless and unsupported.
      Specified by:
      isPinned in interface Symbol
      Returns:
      true if the symbol is pinned to its current address.