Class DBTraceBreakpointSpec
- All Implemented Interfaces:
DBTraceObjectInterface,TraceBreakpointCommon,TraceBreakpointSpec,TraceObjectInterface,TraceUniqueObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface ghidra.trace.database.target.DBTraceObjectInterface
DBTraceObjectInterface.Translator<T> -
Field Summary
Fields inherited from interface ghidra.trace.model.breakpoint.TraceBreakpointSpec
KEY_AS_BPT, KEY_EXPRESSION, KEY_KINDSFields 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Delete this breakpoint from the tracegetComment(long snap) Get the comment on this breakpointgetExpression(long snap) Get the expression used to specify this breakpoint.getKinds(long snap) Get the kinds included in this breakpointCollection<? extends TraceBreakpointLocation> getLocations(long snap) Get the locations for this breakpointprotected Collection<? extends TraceBreakpointLocation> getLocations(Lifespan span) getName(long snap) Get the "short name" of this breakpointGet the object backing this implementationgetPath()Get the "full name" of this breakpointgetTrace()Get the trace containing this breakpointbooleanCheck if the breakpoint is present for any of the given spanbooleanisEnabled(long snap) Check whether this breakpoint is enabled or disabled at the given snapbooleanisValid(long snap) Check if the breakpoint is present at the given snapshotvoidremove(long snap) Remove this breakpoint from the given snap onvoidsetComment(long snap, String comment) Set a comment on this breakpointvoidsetComment(Lifespan lifespan, String comment) Set a comment on this breakpointvoidsetEnabled(long snap, boolean enabled) Set whether this breakpoint was enabled or disabledvoidsetEnabled(Lifespan lifespan, boolean enabled) Set whether this breakpoint was enabled or disabledvoidsetKinds(long snap, Collection<TraceBreakpointKind> kinds) Set the kinds included in this breakpointvoidsetKinds(Lifespan lifespan, Collection<TraceBreakpointKind> kinds) Set the kinds included in this breakpointvoidSet the "short name" of this breakpointvoidSet the "short name" of this breakpointTraceChangeRecord<?, ?> translateEvent(TraceChangeRecord<?, ?> rec) Translate an object event into the interface-specific eventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.trace.database.target.DBTraceObjectInterface
getObjectKey, isDeleted, spaceForValue
-
Constructor Details
-
DBTraceBreakpointSpec
-
-
Method Details
-
getTrace
Description copied from interface:TraceBreakpointCommonGet the trace containing this breakpoint- Specified by:
getTracein interfaceTraceBreakpointCommon- Returns:
- the trace
-
getPath
Description copied from interface:TraceBreakpointCommonGet the "full name" of this breakpointThis is a name unique to this breakpoint, which may not be suitable for display on the screen.
- Specified by:
getPathin interfaceTraceBreakpointCommon- Returns:
- the path
-
setName
Description copied from interface:TraceBreakpointCommonSet the "short name" of this breakpointThis should be a name suitable for display on the screen
- Specified by:
setNamein interfaceTraceBreakpointCommon- Parameters:
lifespan- the span of timename- the new name
-
setName
Description copied from interface:TraceBreakpointCommonSet the "short name" of this breakpointThis should be a name suitable for display on the screen
- Specified by:
setNamein interfaceTraceBreakpointCommon- Parameters:
snap- the first effective snapname- the new name
-
getName
Description copied from interface:TraceBreakpointCommonGet the "short name" of this breakpointThis defaults to the "full name," but can be modified via
TraceBreakpointCommon.setName(long, String)- Specified by:
getNamein interfaceTraceBreakpointCommon- Parameters:
snap- the snap- Returns:
- the name
-
setEnabled
Description copied from interface:TraceBreakpointCommonSet whether this breakpoint was enabled or disabled- Specified by:
setEnabledin interfaceTraceBreakpointCommon- Parameters:
lifespan- the span of timeenabled- true if enabled, false if disabled
-
setEnabled
public void setEnabled(long snap, boolean enabled) Description copied from interface:TraceBreakpointCommonSet whether this breakpoint was enabled or disabled- Specified by:
setEnabledin interfaceTraceBreakpointCommon- Parameters:
snap- the first effective snapenabled- true if enabled, false if disabled
-
isEnabled
public boolean isEnabled(long snap) Description copied from interface:TraceBreakpointCommonCheck whether this breakpoint is enabled or disabled at the given snap- Specified by:
isEnabledin interfaceTraceBreakpointCommon- Parameters:
snap- the snap- Returns:
- true if enabled, false if disabled
-
setKinds
Description copied from interface:TraceBreakpointSpecSet the kinds included in this breakpointSee
TraceBreakpointSpec.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.- Specified by:
setKindsin interfaceTraceBreakpointSpec- Parameters:
lifespan- the span of timekinds- the set of kinds
-
setKinds
Description copied from interface:TraceBreakpointSpecSet the kinds included in this breakpointSee
TraceBreakpointSpec.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.- Specified by:
setKindsin interfaceTraceBreakpointSpec- Parameters:
snap- the snapkinds- the set of kinds
-
getKinds
Description copied from interface:TraceBreakpointSpecGet the kinds included in this breakpointFor example, an "access breakpoint" or "access watchpoint," depending on terminology, would include both
TraceBreakpointKind.READandTraceBreakpointKind.WRITE.- Specified by:
getKindsin interfaceTraceBreakpointSpec- Parameters:
snap- the snap- Returns:
- the set of kinds
-
getExpression
Description copied from interface:TraceBreakpointSpecGet the expression used to specify this breakpoint.- Specified by:
getExpressionin interfaceTraceBreakpointSpec- Parameters:
snap- the snap- Returns:
- the expression
-
setComment
Description copied from interface:TraceBreakpointCommonSet a comment on this breakpoint- Specified by:
setCommentin interfaceTraceBreakpointCommon- Parameters:
lifespan- the span of timecomment- the comment, possiblynull
-
setComment
Description copied from interface:TraceBreakpointCommonSet a comment on this breakpoint- Specified by:
setCommentin interfaceTraceBreakpointCommon- Parameters:
snap- the snapcomment- the comment, possiblynull
-
getComment
Description copied from interface:TraceBreakpointCommonGet the comment on this breakpoint- Specified by:
getCommentin interfaceTraceBreakpointCommon- Parameters:
snap- the snap- Returns:
- the comment, possibly
null
-
delete
public void delete()Description copied from interface:TraceBreakpointCommonDelete this breakpoint from the trace- Specified by:
deletein interfaceTraceBreakpointCommon
-
remove
public void remove(long snap) Description copied from interface:TraceBreakpointCommonRemove this breakpoint from the given snap on- Specified by:
removein interfaceTraceBreakpointCommon- Parameters:
snap- the snap
-
isValid
public boolean isValid(long snap) Description copied from interface:TraceBreakpointCommonCheck if the breakpoint is present at the given snapshotIn object mode, a breakpoint's life may be disjoint, so checking if the snap occurs between creation and destruction is not quite sufficient. This method encapsulates validity. In object mode, it checks that the breakpoint object has a canonical parent at the given snapshot. In table mode, it checks that the lifespan contains the snap.
- Specified by:
isValidin interfaceTraceBreakpointCommon- Parameters:
snap- the snapshot key- Returns:
- true if valid, false if not
-
isAlive
Description copied from interface:TraceBreakpointCommonCheck if the breakpoint is present for any of the given span- Specified by:
isAlivein interfaceTraceBreakpointCommon- Parameters:
span- the span- Returns:
- true if its life intersects the span
-
getObject
Description copied from interface:TraceObjectInterfaceGet the object backing this implementation- Specified by:
getObjectin interfaceTraceObjectInterface- Returns:
- the object
-
getLocations
-
getLocations
Description copied from interface:TraceBreakpointSpecGet the locations for this breakpoint- Specified by:
getLocationsin interfaceTraceBreakpointSpec- Parameters:
snap- the snap- Returns:
- the locations
-
translateEvent
Description copied from interface:DBTraceObjectInterfaceTranslate an object event into the interface-specific eventBoth the object event and the interface-specific event, if applicable, will be emitted. If multiple events need to be emitted, then this method may emit them directly via its object's trace. If exactly one event needs to be emitted, then this method should return the translated record. If no translation applies, or if the translated event(s) were emitted directly, this method returns
null.- Specified by:
translateEventin interfaceDBTraceObjectInterface- Parameters:
rec- the object event- Returns:
- the interface-specific event to emit, or
null
-