Interface TraceBreakpointSpec

All Superinterfaces:
TraceBreakpointCommon, TraceObjectInterface, TraceUniqueObject
All Known Implementing Classes:
DBTraceBreakpointSpec

public interface TraceBreakpointSpec extends TraceBreakpointCommon
The specification of a breakpoint applied to a target object

Note that a single specification could result in several locations, or no locations at all. For example, a breakpoint placed on a function within a module which has not been loaded ("pending" in GDB's nomenclature), will not have any location. On the other hand, a breakpoint expressed by line number in a C++ template or a C macro could resolve to many addresses. The children of this object include the resolved TraceBreakpointLocations. If the debugger does not share this same concept, then its breakpoints should implement both the specification and the location; the specification need not have any children.

This object extends TraceTogglable for a transitional period only. Implementations whose breakpoint specifications can be toggled should declare this interface explicitly. When the specification is user togglable, toggling it should effectively toggle all locations -- whether or not the locations are user togglable.

NOTE: When enumerating trace breakpoints, use the locations, not the specifications.

  • Field Details

  • Method Details

    • getExpression

      String getExpression(long snap)
      Get the expression used to specify this breakpoint.
      Parameters:
      snap - the snap
      Returns:
      the expression
    • setKinds

      void setKinds(Lifespan lifespan, Collection<TraceBreakpointKind> kinds)
      Set the kinds included in this breakpoint

      See getKinds(long). Note that it is unusual for a breakpoint to change kinds during its life. Nevertheless, in the course of recording a trace, it may happen, or at least appear to happen.

      Parameters:
      lifespan - the span of time
      kinds - the set of kinds
    • setKinds

      void setKinds(long snap, Collection<TraceBreakpointKind> kinds)
      Set the kinds included in this breakpoint

      See getKinds(long). Note that it is unusual for a breakpoint to change kinds during its life. Nevertheless, in the course of recording a trace, it may happen, or at least appear to happen.

      Parameters:
      snap - the snap
      kinds - the set of kinds
    • getKinds

      Set<TraceBreakpointKind> getKinds(long snap)
      Get the kinds included in this breakpoint

      For example, an "access breakpoint" or "access watchpoint," depending on terminology, would include both TraceBreakpointKind.READ and TraceBreakpointKind.WRITE.

      Parameters:
      snap - the snap
      Returns:
      the set of kinds
    • getLocations

      Collection<? extends TraceBreakpointLocation> getLocations(long snap)
      Get the locations for this breakpoint
      Parameters:
      snap - the snap
      Returns:
      the locations