Package ghidra.trace.database
Enum Class DBTraceUtils
- All Implemented Interfaces:
Serializable,Comparable<DBTraceUtils>,Constable
Various utilities used for implementing the trace database
Some of these are also useful from the API perspective. TODO: We should probably separate trace API utilities into another class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA (abstract) codec for the offset-snap tuplestatic classA setter which works on ranges of addressesstatic classA codec for compiler spec IDsstatic classA codec for language IDsstatic classA setter which operates on spans of snapshot keysstatic classA tuple used to index/locate a block in the trace's byte stores (memory manager)static classCodec for storingDBTraceUtils.OffsetSnaps asBinaryFields.static classA codec for reference typesstatic classA codec for URLsNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Iterator<T> covariantIterator(Iterator<? extends T> it) Cast an iterator to a less-specific type, given that it cannot insert elementsstatic AddressSetViewgetAddressSet(AddressFactory factory, Address start, boolean forward) Get all the addresses in a factory, starting at the given placestatic <DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<?>>
voidmakeWay(DR data, Lifespan span, BiConsumer<? super DR, Lifespan> lifespanSetter, Consumer<? super DR> deleter) Truncate or delete an entry to make roomstatic StringtableName(String baseName, AddressSpace space) Derive the table name for a given addres/register spacestatic AddressRangeCreate an address range, checking the endpointsstatic DBTraceUtilsReturns the enum constant of this class with the specified name.static DBTraceUtils[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
tableName
Derive the table name for a given addres/register space- Parameters:
baseName- the base name of the table groupspace- the address space- Returns:
- the table name
-
makeWay
public static <DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<?>> void makeWay(DR data, Lifespan span, BiConsumer<? super DR, Lifespan> lifespanSetter, Consumer<? super DR> deleter) Truncate or delete an entry to make roomOnly call this method for entries which definitely intersect the given span. This does not verify intersection. If the data's start snap is contained in the span to clear, the entry is deleted. Otherwise, it's end snap is set to one less than the span's start snap.
- Parameters:
data- the entry subject to truncation or deletionspan- the span to clear uplifespanSetter- the method used to truncate the entrydeleter- the method used to delete the entry
-
covariantIterator
Cast an iterator to a less-specific type, given that it cannot insert elements- Type Parameters:
T- the desired type- Parameters:
it- the iterator of more specific type- Returns:
- the same iterator
-
getAddressSet
Get all the addresses in a factory, starting at the given placeIf backward, this yields all addresses coming before start
- Parameters:
factory- the factorystart- the start (or end) addressforward- true for all after, false for all before- Returns:
- the address set
-
toRange
Create an address range, checking the endpoints- Parameters:
min- the min address, which must be less than or equal to maxmax- the max address, which must be greater than or equal to min- Returns:
- the range
- Throws:
IllegalArgumentException- if max is less than min
-