Package ghidra.trace.model.breakpoint

# Interface TraceBreakpointLocation

All Superinterfaces:
  `TraceBreakpointCommon`, `TraceObjectInterface`, `TraceUniqueObject`

All Known Implementing Classes:
  `DBTraceBreakpointLocation`

public interface TraceBreakpointLocation extends TraceBreakpointCommon

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `KEY_EMU_ENABLED`
  `static final String`
  `KEY_EMU_SLEIGH`
  `static final String`
  `KEY_RANGE`

  ### Fields inherited from interface ghidra.trace.model.target.iface.TraceObjectInterface

  `KEY_COMMENT, KEY_DISPLAY, KEY_KIND, KEY_MODIFIED, KEY_ORDER, KEY_SHORT_DISPLAY, KEY_TYPE, KEY_VALUE`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getEmuSleigh(long snap)`
  Get the Sleigh source that replaces the breakpointed instruction in emulation
  `default Set<TraceBreakpointKind>`
  `getKinds(long snap)`
  See `TraceBreakpointSpec.getKinds(long)`
  `long`
  `getLength(long snap)`
  Get the length of this breakpoint, usually 1
  `Address`
  `getMaxAddress(long snap)`
  Get the maximum address in this breakpoint's range
  `Address`
  `getMinAddress(long snap)`
  Get the minimum address in this breakpoint's range
  `AddressRange`
  `getRange(long snap)`
  Get the range covered by this breakpoint location
  `TraceBreakpointSpec`
  `getSpecification()`
  Get the specification that caused this location to exist
  `Set<TraceThread>`
  `getThreads(long snap)`
  Deprecated, for removal: This API element is subject to removal in a future version.
  `boolean`
  `isEmuEnabled(long snap)`
  Check whether this breakpoint is enabled or disabled for emulation at the given snap
  `void`
  `setEmuEnabled(long snap, boolean enabled)`
  Set whether this breakpoint is enabled or disabled for emulation
  `void`
  `setEmuEnabled(Lifespan lifespan, boolean enabled)`
  Set whether this breakpoint is enabled or disabled for emulation
  `void`
  `setEmuSleigh(long snap, String sleigh)`
  Set Sleigh source to replace the breakpointed instruction in emulation
  `void`
  `setEmuSleigh(Lifespan lifespan, String sleigh)`
  As in `setEmuSleigh(long, String)`, but for a specific lifespan
  `void`
  `setRange(Lifespan lifespan, AddressRange range)`
  Set the range covered by this breakpoint location

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

  `delete, getComment, getName, getPath, getTrace, isAlive, isEnabled, isValid, remove, setComment, setComment, setEnabled, setEnabled, setName, setName`

  ### Methods inherited from interface ghidra.trace.model.target.iface.TraceObjectInterface

  `getObject`

  ### Methods inherited from interface ghidra.trace.model.TraceUniqueObject

  `getObjectKey, isDeleted`

- ## Field Details

  - ### KEY_RANGE

    static final String KEY_RANGE
    See Also:
      - Constant Field Values

  - ### KEY_EMU_ENABLED

    static final String KEY_EMU_ENABLED
    See Also:
      - Constant Field Values

  - ### KEY_EMU_SLEIGH

    static final String KEY_EMU_SLEIGH
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getSpecification

    TraceBreakpointSpec getSpecification()
    Get the specification that caused this location to exist
    Returns:
      the specification

  - ### getKinds

    default Set<TraceBreakpointKind> getKinds(long snap)
    See `TraceBreakpointSpec.getKinds(long)`
    Parameters:
      `snap` - the snap
    Returns:
      the kinds

  - ### getThreads

    @Deprecated(forRemoval=true, since="12.0") Set<TraceThread> getThreads(long snap)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the set of threads to which this breakpoint's application is limited

    Note, an empty set here implies all contemporary live threads, i.e., the process.

    Parameters:
      `snap` - the snap
    Returns:
      the (possibly empty) set of affected threads

  - ### setRange

    void setRange(Lifespan lifespan, AddressRange range)
    Set the range covered by this breakpoint location
    Parameters:
      `lifespan` - the span of time
      `range` - the span of addresses

  - ### getRange

    AddressRange getRange(long snap)
    Get the range covered by this breakpoint location

    Most often, esp. for execution breakpoints, this is a single address.

    Parameters:
      `snap` - the snap
    Returns:
      the range

  - ### getMinAddress

    Address getMinAddress(long snap)
    Get the minimum address in this breakpoint's range
    Parameters:
      `snap` - the snap
    Returns:
      the minimum address
    See Also:
      - `getRange(long)`

  - ### getMaxAddress

    Address getMaxAddress(long snap)
    Get the maximum address in this breakpoint's range
    Parameters:
      `snap` - the snap
    Returns:
      the maximum address
    See Also:
      - `getRange(long)`

  - ### getLength

    long getLength(long snap)
    Get the length of this breakpoint, usually 1
    Parameters:
      `snap` - the snap
    Returns:
      the length

  - ### setEmuEnabled

    void setEmuEnabled(Lifespan lifespan, boolean enabled)
    Set whether this breakpoint is enabled or disabled for emulation
    Parameters:
      `lifespan` - the span of time
      `enabled` - true if enabled, false if disabled

  - ### setEmuEnabled

    void setEmuEnabled(long snap, boolean enabled)
    Set whether this breakpoint is enabled or disabled for emulation
    Parameters:
      `snap` - the snap
      `enabled` - true if enabled, false if disabled

  - ### isEmuEnabled

    boolean isEmuEnabled(long snap)
    Check whether this breakpoint is enabled or disabled for emulation at the given snap
    Parameters:
      `snap` - the snap
    Returns:
      true if enabled, false if disabled

  - ### setEmuSleigh

    void setEmuSleigh(Lifespan lifespan, String sleigh)
    As in `setEmuSleigh(long, String)`, but for a specific lifespan
    Parameters:
      `lifespan` - the span of time
      `sleigh` - the Sleigh source

  - ### setEmuSleigh

    void setEmuSleigh(long snap, String sleigh)
    Set Sleigh source to replace the breakpointed instruction in emulation

    The default is simply:

         emu_swi();
         emu_exec_decoded();

    That is effectively a non-conditional breakpoint followed by execution of the actual instruction. Modifying this allows clients to create conditional breakpoints or simply override or inject additional logic into an emulated target.

    NOTE: This currently has no effect on access breakpoints, but only execution breakpoints.

    If the specified source fails to compile during emulator set-up, this will fall back to `DefaultPcodeThread.PcodeEmulationLibrary.emu_swi()`

    Parameters:
      `snap` - the snap
      `sleigh` - the Sleigh source
    See Also:
      - `SleighUtils.UNCONDITIONAL_BREAK`

  - ### getEmuSleigh

    String getEmuSleigh(long snap)
    Get the Sleigh source that replaces the breakpointed instruction in emulation
    Parameters:
      `snap` - the snap
    Returns:
      the Sleigh source