Package ghidra.trace.model.breakpoint
Interface TraceBreakpointLocation
- All Superinterfaces:
TraceBreakpointCommon,TraceObjectInterface,TraceUniqueObject
- All Known Implementing Classes:
DBTraceBreakpointLocation
-
Field Summary
FieldsFields 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 TypeMethodDescriptiongetEmuSleigh(long snap) Get the Sleigh source that replaces the breakpointed instruction in emulationdefault Set<TraceBreakpointKind> getKinds(long snap) longgetLength(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 rangegetRange(long snap) Get the range covered by this breakpoint locationGet the specification that caused this location to existgetThreads(long snap) Deprecated, for removal: This API element is subject to removal in a future version.booleanisEmuEnabled(long snap) Check whether this breakpoint is enabled or disabled for emulation at the given snapvoidsetEmuEnabled(long snap, boolean enabled) Set whether this breakpoint is enabled or disabled for emulationvoidsetEmuEnabled(Lifespan lifespan, boolean enabled) 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 insetEmuSleigh(long, String), but for a specific lifespanvoidsetRange(Lifespan lifespan, AddressRange range) Set the range covered by this breakpoint locationMethods inherited from interface ghidra.trace.model.breakpoint.TraceBreakpointCommon
delete, getComment, getName, getPath, getTrace, isAlive, isEnabled, isValid, remove, setComment, setComment, setEnabled, setEnabled, setName, setNameMethods inherited from interface ghidra.trace.model.target.iface.TraceObjectInterface
getObjectMethods inherited from interface ghidra.trace.model.TraceUniqueObject
getObjectKey, isDeleted
-
Field Details
-
KEY_RANGE
- See Also:
-
KEY_EMU_ENABLED
- See Also:
-
KEY_EMU_SLEIGH
- See Also:
-
-
Method Details
-
getSpecification
TraceBreakpointSpec getSpecification()Get the specification that caused this location to exist- Returns:
- the specification
-
getKinds
- Parameters:
snap- the snap- Returns:
- the kinds
-
getThreads
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 limitedNote, 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
Set the range covered by this breakpoint location- Parameters:
lifespan- the span of timerange- the span of addresses
-
getRange
Get the range covered by this breakpoint locationMost often, esp. for execution breakpoints, this is a single address.
- Parameters:
snap- the snap- Returns:
- the range
-
getMinAddress
Get the minimum address in this breakpoint's range- Parameters:
snap- the snap- Returns:
- the minimum address
- See Also:
-
getMaxAddress
Get the maximum address in this breakpoint's range- Parameters:
snap- the snap- Returns:
- the maximum address
- See Also:
-
getLength
long getLength(long snap) Get the length of this breakpoint, usually 1- Parameters:
snap- the snap- Returns:
- the length
-
setEmuEnabled
Set whether this breakpoint is enabled or disabled for emulation- Parameters:
lifespan- the span of timeenabled- 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 snapenabled- 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
As insetEmuSleigh(long, String), but for a specific lifespan- Parameters:
lifespan- the span of timesleigh- the Sleigh source
-
setEmuSleigh
Set 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()- Parameters:
snap- the snapsleigh- the Sleigh source- See Also:
-
getEmuSleigh
Get the Sleigh source that replaces the breakpointed instruction in emulation- Parameters:
snap- the snap- Returns:
- the Sleigh source
-