Package ghidra.trace.model.breakpoint

# Interface TraceBreakpointManager

All Known Implementing Classes:
  `DBTraceBreakpointManager`

public interface TraceBreakpointManager
A store for recording breakpoint placement over time in a trace

- ## Method Summary

  Modifier and Type
  Method
  Description
  `TraceBreakpointLocation`
  `addBreakpoint(String path, Lifespan lifespan, AddressRange range, Collection<TraceThread> threads, Collection<TraceBreakpointKind> kinds, boolean enabled, String comment)`
  Add a breakpoint to the trace
  `default TraceBreakpointLocation`
  `addBreakpoint(String path, Lifespan lifespan, Address address, Collection<TraceThread> threads, Collection<TraceBreakpointKind> kinds, boolean enabled, String comment)`
  Add a breakpoint to the trace at a single address
  `Collection<? extends TraceBreakpointLocation>`
  `getAllBreakpointLocations()`
  Collect all breakpoint locations in the trace
  `Collection<? extends TraceBreakpointSpec>`
  `getAllBreakpointSpecifications()`
  Collect all breakpoint specifications in the trace
  `Collection<? extends TraceBreakpointLocation>`
  `getBreakpointLocationsByPath(String path)`
  Collect breakpoints locations having the given "full name"
  `Collection<? extends TraceBreakpointLocation>`
  `getBreakpointsAt(long snap, Address address)`
  Collect breakpoints containing the given snap and address
  `Collection<? extends TraceBreakpointLocation>`
  `getBreakpointsIntersecting(Lifespan span, AddressRange range)`
  Collect breakpoints intersecting the given span and address range
  `Collection<? extends TraceBreakpointSpec>`
  `getBreakpointSpecificationsByPath(String path)`
  Collect breakpoints specifications having the given "full name"
  `TraceBreakpointLocation`
  `getPlacedBreakpointByPath(long snap, String path)`
  Get the placed breakpoint at the given snap by the given path
  `default TraceBreakpointLocation`
  `placeBreakpoint(String path, long snap, AddressRange range, Collection<TraceThread> threads, Collection<TraceBreakpointKind> kinds, boolean enabled, String comment)`
  Add a breakpoint to the trace starting at a given snap
  `default TraceBreakpointLocation`
  `placeBreakpoint(String path, long snap, Address address, Collection<TraceThread> threads, Collection<TraceBreakpointKind> kinds, boolean enabled, String comment)`
  Add a breakpoint to the trace at a single address, starting at a given snap

- ## Method Details

  - ### addBreakpoint

    TraceBreakpointLocation addBreakpoint(String path, Lifespan lifespan, AddressRange range, Collection<TraceThread> threads, Collection<TraceBreakpointKind> kinds, boolean enabled, String comment) throws DuplicateNameException
    Add a breakpoint to the trace
    Parameters:
      `path` - the "full name" of the breakpoint
      `lifespan` - the lifespan of the breakpoint
      `range` - the address range of the breakpoint
      `threads` - an optional set of threads to which the breakpoint applies. Empty for every thread, i.e, the process.
      `kinds` - the kinds of breakpoint
      `enabled` - true if the breakpoint is enabled
      `comment` - a user comment
    Returns:
      the new breakpoint.
    Throws:
      `DuplicateNameException` - if a breakpoint with the same path already exists within an overlapping snap

  - ### addBreakpoint

    default TraceBreakpointLocation addBreakpoint(String path, Lifespan lifespan, Address address, Collection<TraceThread> threads, Collection<TraceBreakpointKind> kinds, boolean enabled, String comment) throws DuplicateNameException
    Add a breakpoint to the trace at a single address
    Throws:
      `DuplicateNameException`
    See Also:
      - `addBreakpoint(String, Lifespan, AddressRange, Collection, Collection, boolean, String)`

  - ### placeBreakpoint

    default TraceBreakpointLocation placeBreakpoint(String path, long snap, AddressRange range, Collection<TraceThread> threads, Collection<TraceBreakpointKind> kinds, boolean enabled, String comment) throws DuplicateNameException
    Add a breakpoint to the trace starting at a given snap
    Throws:
      `DuplicateNameException`
    See Also:
      - `addBreakpoint(String, Lifespan, AddressRange, Collection, Collection, boolean, String)`

  - ### placeBreakpoint

    default TraceBreakpointLocation placeBreakpoint(String path, long snap, Address address, Collection<TraceThread> threads, Collection<TraceBreakpointKind> kinds, boolean enabled, String comment) throws DuplicateNameException
    Add a breakpoint to the trace at a single address, starting at a given snap
    Throws:
      `DuplicateNameException`
    See Also:
      - `addBreakpoint(String, Lifespan, AddressRange, Collection, Collection, boolean, String)`

  - ### getAllBreakpointSpecifications

    Collection<? extends TraceBreakpointSpec> getAllBreakpointSpecifications()
    Collect all breakpoint specifications in the trace
    Returns:
      the specifications

  - ### getAllBreakpointLocations

    Collection<? extends TraceBreakpointLocation> getAllBreakpointLocations()
    Collect all breakpoint locations in the trace
    Returns:
      the locations

  - ### getBreakpointSpecificationsByPath

    Collection<? extends TraceBreakpointSpec> getBreakpointSpecificationsByPath(String path)
    Collect breakpoints specifications having the given "full name"
    Parameters:
      `path` - the path
    Returns:
      the specifications

  - ### getBreakpointLocationsByPath

    Collection<? extends TraceBreakpointLocation> getBreakpointLocationsByPath(String path)
    Collect breakpoints locations having the given "full name"
    Parameters:
      `path` - the path
    Returns:
      the locations

  - ### getPlacedBreakpointByPath

    TraceBreakpointLocation getPlacedBreakpointByPath(long snap, String path)
    Get the placed breakpoint at the given snap by the given path
    Parameters:
      `snap` - the snap which the breakpoint's lifespan must contain
      `path` - the path of the breakpoint
    Returns:
      the breakpoint, or `null` if no breakpoint matches

  - ### getBreakpointsAt

    Collection<? extends TraceBreakpointLocation> getBreakpointsAt(long snap, Address address)
    Collect breakpoints containing the given snap and address
    Parameters:
      `snap` - the time
      `address` - the location
    Returns:
      the collection of breakpoints

  - ### getBreakpointsIntersecting

    Collection<? extends TraceBreakpointLocation> getBreakpointsIntersecting(Lifespan span, AddressRange range)
    Collect breakpoints intersecting the given span and address range
    Parameters:
      `span` - the span
      `range` - the address range
    Returns:
      the collection of breakpoints