Class AbstractDBTraceCodeUnit<T extends AbstractDBTraceCodeUnit<T>>

Type Parameters:
T - the implementation type of this unit
All Implemented Interfaces:
CodeUnit, MemBuffer, MemBufferMixin, PropertySet, DBTraceCodeUnitAdapter, TraceCodeUnit, TraceAddressSnapRange, BoundedShape<TraceAddressSnapRange>, BoundingShape<TraceAddressSnapRange>, Rectangle2D<Address,Long,TraceAddressSnapRange>
Direct Known Subclasses:
DBTraceData, DBTraceInstruction

public abstract class AbstractDBTraceCodeUnit<T extends AbstractDBTraceCodeUnit<T>> extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T> implements DBTraceCodeUnitAdapter
An abstract implementation of a table-backed code unit

This is implemented as a data entry in an address-snap-range property map. This is not suitable for data components, nor for undefined units.

  • Field Details

  • Constructor Details

  • Method Details

    • getAddress

      public Address getAddress()
      Description copied from interface: MemBuffer
      Get the Address which corresponds to the offset 0.
      Specified by:
      getAddress in interface MemBuffer
      Returns:
      the current address of offset 0.
    • getMaxAddress

      public Address getMaxAddress()
      Description copied from interface: CodeUnit
      Returns the ending address for this code unit..
      Specified by:
      getMaxAddress in interface CodeUnit
      Returns:
      the ending address for this code unit.
    • getLength

      public int getLength()
      Description copied from interface: CodeUnit
      Get length of this code unit. NOTE: If an instruction length-override is set this method will return the reduced length.
      Specified by:
      getLength in interface CodeUnit
      Returns:
      code unit length
    • getThread

      public TraceThread getThread()
      Description copied from interface: TraceCodeUnit
      Get the thread associated with this code unit

      A thread is associated with a code unit if it exists in a register space

      Specified by:
      getThread in interface TraceCodeUnit
      Returns:
      the thread
    • getTrace

      public DBTrace getTrace()
      Description copied from interface: TraceCodeUnit
      Get the trace in which this code unit exists
      Specified by:
      getTrace in interface DBTraceCodeUnitAdapter
      Specified by:
      getTrace in interface TraceCodeUnit
      Returns:
      the trace
    • getStartSnap

      public long getStartSnap()
      Description copied from interface: TraceCodeUnit
      Get the start snap of this code unit
      Specified by:
      getStartSnap in interface TraceCodeUnit
      Returns:
      the first snap of this unit's lifespan
    • setEndSnap

      public void setEndSnap(long endSnap)
      Description copied from interface: TraceCodeUnit
      Set the end snap of this code unit
      Specified by:
      setEndSnap in interface TraceCodeUnit
      Parameters:
      endSnap - the last snap of this unit's lifespan
    • getEndSnap

      public long getEndSnap()
      Description copied from interface: TraceCodeUnit
      Get the end snap of this code unit
      Specified by:
      getEndSnap in interface TraceCodeUnit
      Returns:
      the last snap of this unit's lifespan
    • getBytes

      public int getBytes(ByteBuffer buffer, int addressOffset)
      Description copied from interface: TraceCodeUnit
      Read bytes starting at this unit's address plus the given offset into the given buffer

      This method honors the markers (position and limit) of the destination buffer. Use those markers to control the destination offset and maximum length.

      Specified by:
      getBytes in interface MemBufferMixin
      Specified by:
      getBytes in interface TraceCodeUnit
      Parameters:
      buffer - the destination buffer
      addressOffset - the offset from this unit's (minimum) address
      Returns:
      the number of bytes read