Interface TraceBaseCodeUnitsView<T extends TraceCodeUnit>

Type Parameters:
T - the type of units in the view
All Known Subinterfaces:
InternalBaseCodeUnitsView<T>, InternalTraceBaseDefinedUnitsView<T>, InternalTraceDefinedDataView, TraceBaseDefinedUnitsView<T>, TraceCodeUnitsView, TraceDataView, TraceDefinedDataView, TraceDefinedUnitsView, TraceInstructionsView, TraceUndefinedDataView
All Known Implementing Classes:
DBTraceCodeUnitsMemoryView, DBTraceCodeUnitsView, DBTraceDataMemoryView, DBTraceDataView, DBTraceDefinedDataMemoryView, DBTraceDefinedDataView, DBTraceDefinedUnitsMemoryView, DBTraceDefinedUnitsView, DBTraceInstructionsMemoryView, DBTraceInstructionsView, DBTraceUndefinedDataMemoryView, DBTraceUndefinedDataView

public interface TraceBaseCodeUnitsView<T extends TraceCodeUnit>
A view of code units stored in a trace, possibly restricted to a particular subset by type, address space, or thread and frame.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    containsAddress(long snap, Address address)
    Check if the given address is contained by a live unit
    boolean
    Check if the given span of snaps and range of addresses is covered by the units
    boolean
    Check if the given address-snap range is covered by the units
    Iterable<? extends T>
    get(long snap, boolean forward)
    Get all the live units
    Iterable<? extends T>
    get(long snap, Address start, boolean forward)
    Get the live units whose start addresses are within the specified range
    Iterable<? extends T>
    get(long snap, AddressRange range, boolean forward)
    Get the live units whose start addresses are within the specified range
    Iterable<? extends T>
    get(long snap, Address min, Address max, boolean forward)
    Get the live units whose start addresses are within the specified range
    Iterable<? extends T>
    get(long snap, AddressSetView set, boolean forward)
    Get the live units whose start addresses are in the given set
    default Iterable<? extends T>
    get(long snap, Register register, boolean forward)
    Get the live units whose start addresses are within the given register
    Iterable<? extends T>
    get(TracePlatform platform, long snap, Register register, boolean forward)
    Get the live units whose start addresses are within the given register
    getAddressSetView(long snap)
    Get all addresses contained by live units at the given snap
    getAddressSetView(long snap, AddressRange within)
    Get all addresses contained by live units at the given snap, within a restricted range
    getAfter(long snap, Address address)
    Get the nearest live unit whose start address is after the given address
    getAt(long snap, Address address)
    Get the unit starting at exactly this address Note that the unit need only contain the given snap
    getBefore(long snap, Address address)
    Get the nearest live unit whose start address is before the given address
    getCeiling(long snap, Address address)
    Get the nearest live unit whose start address is at or after the given address
    getContaining(long snap, Address address)
    Get the live unit containing the given address
    default T
    getContaining(long snap, Register register)
    Get the unit which completely contains the given register
    getContaining(TracePlatform platform, long snap, Register register)
    Get the unit which completely contains the given register
    getFloor(long snap, Address address)
    Get the nearest live unit whose start address is at or before the given address
    default T
    getForRegister(long snap, Register register)
    Get the unit (or component of a structure) which spans exactly the addresses of the given register
    getForRegister(TracePlatform platform, long snap, Register register)
    Get the unit (or component of a structure) which spans exactly the addresses of the given platform register
    Iterable<? extends T>
    Get the units which intersect the given box, in no particular order
    Get the trace for this view
    boolean
    Check if the given span of snaps and range of addresses intersects any unit
    boolean
    Check if the given span of snaps and range of addresses intersects any unit
    int
    Get the total number of defined units in this view
  • Method Details

    • getTrace

      Trace getTrace()
      Get the trace for this view
      Returns:
      the trace
    • size

      int size()
      Get the total number of defined units in this view
      Returns:
      the size
    • getBefore

      T getBefore(long snap, Address address)
      Get the nearest live unit whose start address is before the given address
      Parameters:
      snap - the snap during which the unit must be alive
      address - the address which the unit's start must precede
      Returns:
      the code unit, or null if it doesn't exist
    • getFloor

      T getFloor(long snap, Address address)
      Get the nearest live unit whose start address is at or before the given address
      Parameters:
      snap - the snap during which the unit must be alive
      address - the address which the unit's start must equal or precede
      Returns:
      the code unit, or null if it doesn't exist
    • getContaining

      T getContaining(long snap, Address address)
      Get the live unit containing the given address
      Parameters:
      snap - the snap during which the unit must be alive
      address - the address which the unit must contain
      Returns:
      the code unit, or null if it doesn't exist
    • getAt

      T getAt(long snap, Address address)
      Get the unit starting at exactly this address Note that the unit need only contain the given snap
      Parameters:
      snap - the snap during which the unit must be alive
      address - the unit's start address
      Returns:
      the code unit, or null if it doesn't exist
    • getCeiling

      T getCeiling(long snap, Address address)
      Get the nearest live unit whose start address is at or after the given address
      Parameters:
      snap - the snap during which the unit must be alive
      address - the address which the unit's start must equal or follow
      Returns:
      the code unit, or null if it doesn't exist
    • getAfter

      T getAfter(long snap, Address address)
      Get the nearest live unit whose start address is after the given address
      Parameters:
      snap - the snap during which the unit must be alive
      address - the address which the unit's start must follow
      Returns:
      the code unit, or null if it doesn't exist
    • get

      Iterable<? extends T> get(long snap, Address min, Address max, boolean forward)
      Get the live units whose start addresses are within the specified range
      Parameters:
      snap - the snap during which the units must be alive
      min - the minimum start address, inclusive
      max - the maximum start address, inclusive
      forward - true to order the units by increasing address, false for descending
      Returns:
      the iterable of units
    • get

      Iterable<? extends T> get(long snap, AddressSetView set, boolean forward)
      Get the live units whose start addresses are in the given set
      Parameters:
      snap - the snap during which the units must be alive
      set - the address set
      forward - true to order the units by increasing address, false for descending
      Returns:
      the iterable of units
    • get

      Iterable<? extends T> get(long snap, AddressRange range, boolean forward)
      Get the live units whose start addresses are within the specified range
      Parameters:
      snap - the snap during which the units must be alive
      range - the address range
      forward - true to order the units by increasing address, false for descending
      Returns:
      the iterable of units
    • get

      Iterable<? extends T> get(long snap, Address start, boolean forward)
      Get the live units whose start addresses are within the specified range
      Parameters:
      snap - the snap during which the units must be alive
      start - the minimum (forward) or maximum (backward) start address, inclusive
      forward - true to order the units by increasing address, false for descending
      Returns:
      the iterable of units
    • get

      Iterable<? extends T> get(long snap, boolean forward)
      Get all the live units
      Parameters:
      snap - the snap during which the units must be alive
      forward - true to order the units by increasing address, false for descending
      Returns:
      the iterable of units
    • getIntersecting

      Iterable<? extends T> getIntersecting(TraceAddressSnapRange tasr)
      Get the units which intersect the given box, in no particular order
      Parameters:
      tasr - the box (snap range by address range)
      Returns:
      an iterable over the intersecting units
    • getAddressSetView

      AddressSetView getAddressSetView(long snap)
      Get all addresses contained by live units at the given snap

      Note that the ranges in this set may not be coalesced. If a coalesced set is required, wrap it with UnionAddressSetView.

      Parameters:
      snap - the snap during which the units must be alive
      Returns:
      a (lazy) view of the address set
    • getAddressSetView

      AddressSetView getAddressSetView(long snap, AddressRange within)
      Get all addresses contained by live units at the given snap, within a restricted range

      Note that the ranges in this set may not be coalesced. If a coalesced set is required, wrap it with UnionAddressSetView. The returned ranges are not necessarily enclosed by within, but they will intersect it. If strict enclosure is required, wrap the set with IntersectionAddressSetView.

      Parameters:
      snap - the snap during which the units must be alive
      within - the range to restrict the view
      Returns:
      a (lazy) view of the address set
    • containsAddress

      boolean containsAddress(long snap, Address address)
      Check if the given address is contained by a live unit
      Parameters:
      snap - the snap during which the unit must be alive
      address - the address to check
      Returns:
      true if it is contained, false if not
    • coversRange

      boolean coversRange(Lifespan span, AddressRange range)
      Check if the given span of snaps and range of addresses is covered by the units

      This checks if every (snap, address) point within the given box is contained within some code unit in this view.

      Parameters:
      span - the span of snaps
      range - the address range
      Returns:
      true if covered, false otherwise
    • coversRange

      boolean coversRange(TraceAddressSnapRange range)
      Check if the given address-snap range is covered by the units

      This checks if every (snap, address) point within the given box is contained within some code unit in this view.

      Parameters:
      range - the address-snap range
      Returns:
      true if covered, false otherwise
    • intersectsRange

      boolean intersectsRange(Lifespan span, AddressRange range)
      Check if the given span of snaps and range of addresses intersects any unit

      This checks if any (snap, address) point within the given box is contained within some code unit in this view.

      Parameters:
      span - the span of snaps
      range - the address range
      Returns:
      true if intersecting, false otherwise
    • intersectsRange

      boolean intersectsRange(TraceAddressSnapRange range)
      Check if the given span of snaps and range of addresses intersects any unit

      This checks if any (snap, address) point within the given box is contained within some code unit in this view.

      Parameters:
      range - the address-snap range
      Returns:
      true if intersecting, false otherwise
    • getForRegister

      default T getForRegister(long snap, Register register)
      Get the unit (or component of a structure) which spans exactly the addresses of the given register
      Parameters:
      snap - the snap
      register - the register
      Returns:
      the unit or null
    • getForRegister

      T getForRegister(TracePlatform platform, long snap, Register register)
      Get the unit (or component of a structure) which spans exactly the addresses of the given platform register
      Parameters:
      platform - the platform whose language defines the register
      snap - the snap
      register - the register
      Returns:
      the unit or null
    • getContaining

      default T getContaining(long snap, Register register)
      Get the unit which completely contains the given register

      This does not descend into structures.

      Parameters:
      snap - the snap during which the unit must be alive
      register - the register
      Returns:
      the unit or unit
    • getContaining

      T getContaining(TracePlatform platform, long snap, Register register)
      Get the unit which completely contains the given register

      This does not descend into structures.

      Parameters:
      platform - the platform whose language defines the register
      snap - the snap during which the unit must be alive
      register - the register
      Returns:
      the unit or unit
    • get

      default Iterable<? extends T> get(long snap, Register register, boolean forward)
      Get the live units whose start addresses are within the given register
      Parameters:
      snap - the snap
      register - the register
      forward - true to order the units by increasing address, false for descending
      Returns:
      the iterable of units
    • get

      Iterable<? extends T> get(TracePlatform platform, long snap, Register register, boolean forward)
      Get the live units whose start addresses are within the given register
      Parameters:
      platform - the platform whose language defines the register
      snap - the snap during which the units must be alive
      register - the register
      forward - true to order the units by increasing address, false for descending
      Returns:
      the iterable of units