Class DBTraceBreakpointLocation
- All Implemented Interfaces:
DBTraceObjectInterface,TraceBreakpointCommon,TraceBreakpointLocation,TraceObjectInterface,TraceUniqueObject
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classNested classes/interfaces inherited from interface ghidra.trace.database.target.DBTraceObjectInterface
DBTraceObjectInterface.Translator<T> -
Field Summary
Fields inherited from interface ghidra.trace.model.breakpoint.TraceBreakpointLocation
KEY_EMU_ENABLED, KEY_EMU_SLEIGH, KEY_RANGEFields 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 tracegetAddressSpace(long snap) getComment(long snap) Get the comment on this breakpointgetEmuSleigh(long snap) Get the Sleigh source that replaces the breakpointed instruction in emulationlonggetLength(long snap) Get the length of this breakpoint, usually 1getMaxAddress(long snap) Get the maximum address in this breakpoint's rangegetMinAddress(long snap) Get the minimum address in this breakpoint's rangegetName(long snap) Get the "short name" of this breakpointGet the object backing this implementationgetPath()Get the "full name" of this breakpointgetRange(long snap) Get the range covered by this breakpoint locationGet the specification that caused this location to existgetThreads(long snap) Get the set of threads to which this breakpoint's application is limitedgetTrace()Get the trace containing this breakpointbooleanCheck if the breakpoint is present for any of the given spanbooleanisEmuEnabled(long snap) Check whether this breakpoint is enabled or disabled for emulation at the given snapbooleanisEnabled(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 breakpointvoidsetEmuEnabled(long snap, boolean emuEnabled) Set whether this breakpoint is enabled or disabled for emulationvoidsetEmuEnabled(Lifespan lifespan, boolean emuEnabled) Set whether this breakpoint is enabled or disabled for emulationvoidsetEmuSleigh(long snap, String sleigh) Set Sleigh source to replace the breakpointed instruction in emulationvoidsetEmuSleigh(Lifespan lifespan, String sleigh) As inTraceBreakpointLocation.setEmuSleigh(long, String), but for a specific lifespanvoidsetEnabled(long snap, boolean enabled) Set whether this breakpoint was enabled or disabledvoidsetEnabled(Lifespan lifespan, boolean enabled) Set whether this breakpoint was enabled or disabledvoidSet the "short name" of this breakpointvoidSet the "short name" of this breakpointvoidsetRange(Lifespan lifespan, AddressRange range) Set the range covered by this breakpoint locationTraceChangeRecord<?, ?> 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, spaceForValueMethods inherited from interface ghidra.trace.model.breakpoint.TraceBreakpointLocation
getKinds
-
Constructor Details
-
DBTraceBreakpointLocation
-
-
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
-
setRange
Description copied from interface:TraceBreakpointLocationSet the range covered by this breakpoint location- Specified by:
setRangein interfaceTraceBreakpointLocation- Parameters:
lifespan- the span of timerange- the span of addresses
-
getRange
Description copied from interface:TraceBreakpointLocationGet the range covered by this breakpoint locationMost often, esp. for execution breakpoints, this is a single address.
- Specified by:
getRangein interfaceTraceBreakpointLocation- Parameters:
snap- the snap- Returns:
- the range
-
getMinAddress
Description copied from interface:TraceBreakpointLocationGet the minimum address in this breakpoint's range- Specified by:
getMinAddressin interfaceTraceBreakpointLocation- Parameters:
snap- the snap- Returns:
- the minimum address
- See Also:
-
getMaxAddress
Description copied from interface:TraceBreakpointLocationGet the maximum address in this breakpoint's range- Specified by:
getMaxAddressin interfaceTraceBreakpointLocation- Parameters:
snap- the snap- Returns:
- the maximum address
- See Also:
-
getLength
public long getLength(long snap) Description copied from interface:TraceBreakpointLocationGet the length of this breakpoint, usually 1- Specified by:
getLengthin interfaceTraceBreakpointLocation- Parameters:
snap- the snap- Returns:
- the length
-
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
-
getThreads
Description copied from interface:TraceBreakpointLocationGet the set of threads to which this breakpoint's application is limitedNote, an empty set here implies all contemporary live threads, i.e., the process.
- Specified by:
getThreadsin interfaceTraceBreakpointLocation- Parameters:
snap- the snap- Returns:
- the (possibly empty) set of affected threads
-
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
-
setEmuEnabled
Description copied from interface:TraceBreakpointLocationSet whether this breakpoint is enabled or disabled for emulation- Specified by:
setEmuEnabledin interfaceTraceBreakpointLocation- Parameters:
lifespan- the span of timeemuEnabled- true if enabled, false if disabled
-
setEmuEnabled
public void setEmuEnabled(long snap, boolean emuEnabled) Description copied from interface:TraceBreakpointLocationSet whether this breakpoint is enabled or disabled for emulation- Specified by:
setEmuEnabledin interfaceTraceBreakpointLocation- Parameters:
snap- the snapemuEnabled- true if enabled, false if disabled
-
isEmuEnabled
public boolean isEmuEnabled(long snap) Description copied from interface:TraceBreakpointLocationCheck whether this breakpoint is enabled or disabled for emulation at the given snap- Specified by:
isEmuEnabledin interfaceTraceBreakpointLocation- Parameters:
snap- the snap- Returns:
- true if enabled, false if disabled
-
setEmuSleigh
Description copied from interface:TraceBreakpointLocationAs inTraceBreakpointLocation.setEmuSleigh(long, String), but for a specific lifespan- Specified by:
setEmuSleighin interfaceTraceBreakpointLocation- Parameters:
lifespan- the span of timesleigh- the Sleigh source
-
setEmuSleigh
Description copied from interface:TraceBreakpointLocationSet Sleigh source to replace the breakpointed instruction in emulationThe 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()- Specified by:
setEmuSleighin interfaceTraceBreakpointLocation- Parameters:
snap- the snapsleigh- the Sleigh source- See Also:
-
getEmuSleigh
Description copied from interface:TraceBreakpointLocationGet the Sleigh source that replaces the breakpointed instruction in emulation- Specified by:
getEmuSleighin interfaceTraceBreakpointLocation- Parameters:
snap- the snap- Returns:
- the Sleigh source
-
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
-
getOrCreateSpecification
-
getSpecification
Description copied from interface:TraceBreakpointLocationGet the specification that caused this location to exist- Specified by:
getSpecificationin interfaceTraceBreakpointLocation- Returns:
- the specification
-
getAddressSpace
-
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
-