Class AbstractDBTracePropertyMap<T,DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>>
- All Implemented Interfaces:
ErrorHandler,DBTraceManager,DBTraceDelegatingManager<DBTraceAddressSnapRangePropertyMapSpace<T,,DR>> TraceAddressSnapRangePropertyMap<T>,TraceAddressSnapRangePropertyMapOperations<T>,TracePropertyMap<T>,TracePropertyMapOperations<T>,SpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery>
- Direct Known Subclasses:
AbstractDBTracePropertyMap.DBTraceIntPropertyMap,AbstractDBTracePropertyMap.DBTraceLongPropertyMap,AbstractDBTracePropertyMap.DBTraceSaveablePropertyMap,AbstractDBTracePropertyMap.DBTraceStringPropertyMap,AbstractDBTracePropertyMap.DBTraceVoidPropertyMap
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classclassstatic classstatic classstatic classstatic classstatic classstatic classstatic classNested classes/interfaces inherited from class ghidra.trace.database.map.DBTraceAddressSnapRangePropertyMap
DBTraceAddressSnapRangePropertyMap.DBTraceAddressSnapRangePropertyMapDataFactory<T,DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>> Nested classes/interfaces inherited from class ghidra.trace.database.space.AbstractDBTraceSpaceBasedManager
AbstractDBTraceSpaceBasedManager.DBTraceSpaceEntryNested classes/interfaces inherited from interface ghidra.trace.database.space.DBTraceDelegatingManager
DBTraceDelegatingManager.ExcConsumer<T,E extends Throwable>, DBTraceDelegatingManager.ExcFunction<T, R, E extends Throwable>, DBTraceDelegatingManager.ExcPredicate<T, E extends Throwable>, DBTraceDelegatingManager.ExcSupplier<T, E extends Throwable> Nested classes/interfaces inherited from interface ghidra.util.database.spatial.SpatialMap
SpatialMap.EmptySpatialMap<DS extends BoundedShape<?>,T, Q> -
Field Summary
Fields inherited from class ghidra.trace.database.map.DBTraceAddressSnapRangePropertyMap
dataFactory, dataTypeFields inherited from class ghidra.trace.database.space.AbstractDBTraceSpaceBasedManager
baseLanguage, dbh, lock, name, NO_ADDRESS_SPACE, regSpacesByContainer, spaces, spaceStore, spacesView, threadManager, traceFields inherited from interface ghidra.util.database.spatial.SpatialMap
EMPTY_MAP -
Constructor Summary
ConstructorsConstructorDescriptionAbstractDBTracePropertyMap(String name, DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, Language baseLanguage, DBTrace trace, DBTraceThreadManager threadManager, Class<DR> dataType, DBTraceAddressSnapRangePropertyMap.DBTraceAddressSnapRangePropertyMapDataFactory<T, DR> dataFactory) -
Method Summary
Modifier and TypeMethodDescriptionbooleanclear(Lifespan span, AddressRange range) Remove or truncate entries so that the given box contains no entriesprotected AbstractDBTracePropertyMap<T,DR>.DBTracePropertyMapSpace voiddelete()Delete this property and remove all of its mapsGet the value at the given address-snap pairgetEntries(Lifespan lifespan, AddressRange range) Get the entries intersecting the given boundsGet the entry at the given address-snap pairgetPropertyMapRegisterSpace(TraceThread thread, int frameLevel, boolean createIfAbsent) Get the map space for the registers of a given thread and framegetPropertyMapSpace(AddressSpace space, boolean createIfAbsent) Get the map space for the given address spaceprotected voidprotected voidmakeWay(Map.Entry<TraceAddressSnapRange, T> entry, Lifespan span) put(TraceAddressSnapRange shape, T value) Put an entry into the mapvoidset(Lifespan lifespan, AddressRange range, T value) Set a value over the given rangesvoidSet a value at the given address over the given lifespanMethods inherited from class ghidra.trace.database.map.DBTraceAddressSnapRangePropertyMap
clear, deleteData, deleteValue, entries, firstEntry, firstKey, firstValue, getAddressSetView, getAddressSetView, getForSpace, getName, getRegisterSpace, getRegisterSpace, isEmpty, keys, orderedEntries, orderedKeys, orderedValues, readLock, reduce, remove, remove, size, values, writeLockMethods inherited from class ghidra.trace.database.space.AbstractDBTraceSpaceBasedManager
dbError, get, getActiveSpaces, getBaseLanguage, getForRegisterSpace, getForRegisterSpace, getForRegisterSpace, getLock, getSpaceByName, getTabledSpaces, getTrace, invalidateCache, loadSpaces, tableNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.trace.database.space.DBTraceDelegatingManager
checkIsInMemory, delegateAddressSet, delegateAny, delegateCollection, delegateDeleteB, delegateDeleteV, delegateFirst, delegateHashSet, delegateRead, delegateRead, delegateReadB, delegateReadI, delegateReadI, delegateReadOr, delegateWrite, delegateWriteAll, delegateWriteI, delegateWriteVMethods inherited from interface ghidra.trace.model.map.TraceAddressSnapRangePropertyMapOperations
put, put, put, putMethods inherited from interface ghidra.trace.model.property.TracePropertyMap
getPropertyMapRegisterSpaceMethods inherited from interface ghidra.trace.model.property.TracePropertyMapOperations
getAddressSetView, getValueClass
-
Constructor Details
-
AbstractDBTracePropertyMap
public AbstractDBTracePropertyMap(String name, DBHandle dbh, OpenMode openMode, ReadWriteLock lock, TaskMonitor monitor, Language baseLanguage, DBTrace trace, DBTraceThreadManager threadManager, Class<DR> dataType, DBTraceAddressSnapRangePropertyMap.DBTraceAddressSnapRangePropertyMapDataFactory<T, DR> dataFactory) throws IOException, VersionException- Throws:
IOExceptionVersionException
-
-
Method Details
-
makeWay
-
makeWay
-
set
Description copied from interface:TracePropertyMapOperationsSet a value at the given address over the given lifespan- Specified by:
setin interfaceTracePropertyMapOperations<T>- Parameters:
lifespan- the lifespanaddress- the addressvalue- the value- See Also:
-
set
Description copied from interface:TracePropertyMapOperationsSet a value over the given rangesSetting a value of null still creates an entry, so that Void-typed maps function.
When setting an overlapping value, existing entries are deleted or truncated to make space for the new entry. If an existing entry overlaps and its starting snap is contained in the new entry's span, the existing entry is deleted, regardless of whether or not its ending snap is also contained in the new entry's span. If the starting snap of the existing entry precedes the span of the new entry, the existing entry is truncated -- its ending snap is set to one less than the new entry's starting snap. Address ranges are never truncated.
- Specified by:
setin interfaceTracePropertyMapOperations<T>- Parameters:
lifespan- the lifespanrange- the address rangevalue- the value
-
get
Description copied from interface:TracePropertyMapOperationsGet the value at the given address-snap pair- Specified by:
getin interfaceTracePropertyMapOperations<T>- Parameters:
snap- the snapaddress- the address- Returns:
- the value
-
getEntry
Description copied from interface:TracePropertyMapOperationsGet the entry at the given address-snap pair- Specified by:
getEntryin interfaceTracePropertyMapOperations<T>- Parameters:
snap- the snapaddress- the address- Returns:
- the entry, which includes the ranges and the value
-
getEntries
public Collection<Map.Entry<TraceAddressSnapRange,T>> getEntries(Lifespan lifespan, AddressRange range) Description copied from interface:TracePropertyMapOperationsGet the entries intersecting the given bounds- Specified by:
getEntriesin interfaceTracePropertyMapOperations<T>- Parameters:
lifespan- the range of snapsrange- the range of addresses- Returns:
- the entries
-
clear
Description copied from interface:TracePropertyMapOperationsRemove or truncate entries so that the given box contains no entriesThis applies the same truncation rule as in
TracePropertyMapOperations.set(Lifespan, AddressRange, Object), except that no replacement entry is created.- Specified by:
clearin interfaceTracePropertyMapOperations<T>- Parameters:
span- the range of snapsrange- the address range- Returns:
- true if any entry was affected
-
put
Description copied from interface:SpatialMapPut an entry into the mapNote that the map may copy, and possibly modify, the given value. The value returned is the value actually stored by the map. This may be useful when the map's values are identical to its records. This allows the creation of a "blank" entry with a given shape. The entry is then populated by the user.
class MyDBDataRecord extends DBTreeDataRecord<MyShape, MyNodeShape, MyDBDataRecord> { @Override protected void setValue(MyDBDataRecord value) { // Do nothing: value ought to be null. Map will create and return "blank" record } protected MyDBDataRecord getValue() { return this; // The record is the value } } MyDBDataRecord rec = map.put(MyShape.create(args), null); rec.setSomething(6); rec.setAnother("My user data");This practice is preferred when the values are not simple, and/or when the shape is a property of the value. In other cases, e.g., when the value is an enum or a
Color, thenDBTreeDataRecord.setRecordValue(Object)andDBTreeDataRecord.getRecordValue()should be implemented as field accessors.- Specified by:
putin interfaceSpatialMap<TraceAddressSnapRange,T, DBTraceAddressSnapRangePropertyMapTree.TraceAddressSnapRangeQuery> - Overrides:
putin classDBTraceAddressSnapRangePropertyMap<T,DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>> - Parameters:
shape- the shape of the entryvalue- the value for the entry- Returns:
- the value as stored in the map
-
createSpace
protected AbstractDBTracePropertyMap<T,DR>.DBTracePropertyMapSpace createSpace(AddressSpace space, AbstractDBTraceSpaceBasedManager.DBTraceSpaceEntry ent) throws VersionException, IOException - Overrides:
createSpacein classDBTraceAddressSnapRangePropertyMap<T,DR extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<T>> - Throws:
VersionExceptionIOException
-
getPropertyMapSpace
Description copied from interface:TracePropertyMapGet the map space for the given address space- Specified by:
getPropertyMapSpacein interfaceTracePropertyMap<T>- Parameters:
space- the address spacecreateIfAbsent- true to create the map space if it doesn't already exist- Returns:
- the space, or null
-
getPropertyMapRegisterSpace
public TracePropertyMapSpace<T> getPropertyMapRegisterSpace(TraceThread thread, int frameLevel, boolean createIfAbsent) Description copied from interface:TracePropertyMapGet the map space for the registers of a given thread and frame- Specified by:
getPropertyMapRegisterSpacein interfaceTracePropertyMap<T>- Parameters:
thread- the threadframeLevel- the frame level, 0 being the innermostcreateIfAbsent- true to create the map space if it doesn't already exist- Returns:
- the space, or null
-
delete
public void delete()Description copied from interface:TracePropertyMapDelete this property and remove all of its mapsThe property can be re-created with the same or different value type.
- Specified by:
deletein interfaceTracePropertyMap<T>
-