Package ghidra.pcode.exec.trace.data
Class DefaultPcodeTracePropertyAccess<T>
java.lang.Object
ghidra.pcode.exec.trace.data.DefaultPcodeTracePropertyAccess<T>
- Type Parameters:
T- the type of the property's values
- All Implemented Interfaces:
PcodeTracePropertyAccess<T>
public class DefaultPcodeTracePropertyAccess<T>
extends Object
implements PcodeTracePropertyAccess<T>
The default trace-property access shim
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final InternalPcodeTraceDataAccessprotected final Stringprotected TracePropertyMapOperations<T> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultPcodeTracePropertyAccess(InternalPcodeTraceDataAccess data, String name, Class<T> type) Construct the shim -
Method Summary
Modifier and TypeMethodDescriptionvoidclear(AddressRange range) Clear the property's value across a rangeGet the property's value at the given addressGet the property's entry at the given addressReturns the language.protected TracePropertyMapOperations<T> getPropertyOperations(boolean createIfAbsent) Get the interface for accessing the trace property on memory or registersbooleanhasSpace(AddressSpace space) Check if the trace has allocated property space for the given address spacevoidput(AddressRange range, T value) Set the property's value at the given rangevoidSet the property's value at the given addressprotected AddresstoOverlay(TracePropertyMapOperations<T> ops, Address address) If this provides access to an overlay space, translate the physical address to itprotected AddressRangetoOverlay(TracePropertyMapOperations<T> ops, AddressRange range) If this provides access to an overlay space, translate the physical range to itprotected TExtension point: Alternative logic when the trace property is null
-
Field Details
-
data
-
name
-
type
-
po
-
-
Constructor Details
-
DefaultPcodeTracePropertyAccess
protected DefaultPcodeTracePropertyAccess(InternalPcodeTraceDataAccess data, String name, Class<T> type) Construct the shim- Parameters:
data- the trace-data access shim providing this property access shimname- the name of the propertytype- the type of the property
-
-
Method Details
-
getLanguage
Description copied from interface:PcodeTracePropertyAccessReturns the language.- Specified by:
getLanguagein interfacePcodeTracePropertyAccess<T>- Returns:
- the language
-
getPropertyOperations
Get the interface for accessing the trace property on memory or registers- Parameters:
createIfAbsent- whether to create the missing property (and space in the case of a register property)- Returns:
- the operations, or null
-
whenNull
Extension point: Alternative logic when the trace property is null- Parameters:
hostAddress- the trace address (in the host platform)- Returns:
- the alternative value, or null
-
get
Description copied from interface:PcodeTracePropertyAccessGet the property's value at the given addressThis may search for the same property from other related data sources, e.g., from mapped static images.
- Specified by:
getin interfacePcodeTracePropertyAccess<T>- Parameters:
address- the address- Returns:
- the value, or null if not set
-
getEntry
Description copied from interface:PcodeTracePropertyAccessGet the property's entry at the given address- Specified by:
getEntryin interfacePcodeTracePropertyAccess<T>- Parameters:
address- the address- Returns:
- the entry, or null if not set
-
put
Description copied from interface:PcodeTracePropertyAccessSet the property's value at the given addressThe value is effective for future snapshots up to but excluding the next snapshot where another value is set at the same address.
- Specified by:
putin interfacePcodeTracePropertyAccess<T>- Parameters:
address- the addressvalue- the value to set
-
put
Description copied from interface:PcodeTracePropertyAccessSet the property's value at the given rangeThe value is effective for future snapshots up to but excluding the next snapshot where another value is set at the same address.
- Specified by:
putin interfacePcodeTracePropertyAccess<T>- Parameters:
range- the rangevalue- the value to set
-
clear
Description copied from interface:PcodeTracePropertyAccessClear the property's value across a range- Specified by:
clearin interfacePcodeTracePropertyAccess<T>- Parameters:
range- the range
-
hasSpace
Description copied from interface:PcodeTracePropertyAccessCheck if the trace has allocated property space for the given address spaceThis is available for optimizations when it may take effort to compute an address. If the space is not allocated, then no matter the offset, the property will not have a value. Clients can check this method to avoid the address computation, if they already know the address space.
- Specified by:
hasSpacein interfacePcodeTracePropertyAccess<T>- Parameters:
space- the address space- Returns:
- true if there is a property space
-
toOverlay
If this provides access to an overlay space, translate the physical address to it- Parameters:
ops- the property operationsaddress- the physical address- Returns:
- the overlay address, or the same address
-
toOverlay
If this provides access to an overlay space, translate the physical range to it- Parameters:
ops- the property operationsrange- the physical range- Returns:
- the overlay range, or the same range
-