Package ghidra.trace.database.breakpoint

# Class DBTraceBreakpointManager

java.lang.Object
ghidra.trace.database.breakpoint.DBTraceBreakpointManager

All Implemented Interfaces:
  `ErrorHandler`, `DBTraceManager`, `TraceBreakpointManager`

public class DBTraceBreakpointManager extends Object implements TraceBreakpointManager, DBTraceManager

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final ReadWriteLock`
  `lock`
  `protected final DBTraceObjectManager`
  `objectManager`
  `protected final DBTrace`
  `trace`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DBTraceBreakpointManager(DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, DBTrace trace, DBTraceObjectManager objectManager)`

- ## 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
  `void`
  `dbError(IOException e)`
  Notification that an IO exception occurred.
  `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
  `void`
  `invalidateCache(boolean all)`
  Invalidate this manager's caches

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface ghidra.trace.model.breakpoint.TraceBreakpointManager

  `addBreakpoint, placeBreakpoint, placeBreakpoint`

- ## Field Details

  - ### lock

    protected final ReadWriteLock lock

  - ### trace

    protected final DBTrace trace

  - ### objectManager

    protected final DBTraceObjectManager objectManager

- ## Constructor Details

  - ### DBTraceBreakpointManager

    public DBTraceBreakpointManager(DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, DBTrace trace, DBTraceObjectManager objectManager) throws VersionException, IOException
    Throws:
      `VersionException`
      `IOException`

- ## Method Details

  - ### dbError

    public void dbError(IOException e)
    Description copied from interface: `ErrorHandler`
    Notification that an IO exception occurred.
    Specified by:
      `dbError` in interface `ErrorHandler`
    Parameters:
      `e` - `IOException` which was cause of error

  - ### invalidateCache

    public void invalidateCache(boolean all)
    Description copied from interface: `DBTraceManager`
    Invalidate this manager's caches
    Specified by:
      `invalidateCache` in interface `DBTraceManager`
    Parameters:
      `all` - probably nothing. Check out implementations of `ManagerDB.invalidateCache(boolean)`.

  - ### addBreakpoint

    public TraceBreakpointLocation addBreakpoint(String path, Lifespan lifespan, AddressRange range, Collection<TraceThread> threads, Collection<TraceBreakpointKind> kinds, boolean enabled, String comment) throws DuplicateNameException
    Description copied from interface: `TraceBreakpointManager`
    Add a breakpoint to the trace
    Specified by:
      `addBreakpoint` in interface `TraceBreakpointManager`
    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

  - ### getAllBreakpointSpecifications

    public Collection<? extends TraceBreakpointSpec> getAllBreakpointSpecifications()
    Description copied from interface: `TraceBreakpointManager`
    Collect all breakpoint specifications in the trace
    Specified by:
      `getAllBreakpointSpecifications` in interface `TraceBreakpointManager`
    Returns:
      the specifications

  - ### getAllBreakpointLocations

    public Collection<? extends TraceBreakpointLocation> getAllBreakpointLocations()
    Description copied from interface: `TraceBreakpointManager`
    Collect all breakpoint locations in the trace
    Specified by:
      `getAllBreakpointLocations` in interface `TraceBreakpointManager`
    Returns:
      the locations

  - ### getBreakpointSpecificationsByPath

    public Collection<? extends TraceBreakpointSpec> getBreakpointSpecificationsByPath(String path)
    Description copied from interface: `TraceBreakpointManager`
    Collect breakpoints specifications having the given "full name"
    Specified by:
      `getBreakpointSpecificationsByPath` in interface `TraceBreakpointManager`
    Parameters:
      `path` - the path
    Returns:
      the specifications

  - ### getBreakpointLocationsByPath

    public Collection<? extends TraceBreakpointLocation> getBreakpointLocationsByPath(String path)
    Description copied from interface: `TraceBreakpointManager`
    Collect breakpoints locations having the given "full name"
    Specified by:
      `getBreakpointLocationsByPath` in interface `TraceBreakpointManager`
    Parameters:
      `path` - the path
    Returns:
      the locations

  - ### getPlacedBreakpointByPath

    public TraceBreakpointLocation getPlacedBreakpointByPath(long snap, String path)
    Description copied from interface: `TraceBreakpointManager`
    Get the placed breakpoint at the given snap by the given path
    Specified by:
      `getPlacedBreakpointByPath` in interface `TraceBreakpointManager`
    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

    public Collection<? extends TraceBreakpointLocation> getBreakpointsAt(long snap, Address address)
    Description copied from interface: `TraceBreakpointManager`
    Collect breakpoints containing the given snap and address
    Specified by:
      `getBreakpointsAt` in interface `TraceBreakpointManager`
    Parameters:
      `snap` - the time
      `address` - the location
    Returns:
      the collection of breakpoints

  - ### getBreakpointsIntersecting

    public Collection<? extends TraceBreakpointLocation> getBreakpointsIntersecting(Lifespan span, AddressRange range)
    Description copied from interface: `TraceBreakpointManager`
    Collect breakpoints intersecting the given span and address range
    Specified by:
      `getBreakpointsIntersecting` in interface `TraceBreakpointManager`
    Parameters:
      `span` - the span
      `range` - the address range
    Returns:
      the collection of breakpoints