Class AbstractBaseDBTraceCodeUnitsMemoryView<T extends DBTraceCodeUnitAdapter,M extends AbstractBaseDBTraceCodeUnitsView<T>>
- Type Parameters:
T- the implementation type of the units contained in the viewM- the implementation type of the views being composed
- All Implemented Interfaces:
DBTraceDelegatingManager<M>
- Direct Known Subclasses:
AbstractWithUndefinedDBTraceCodeUnitsMemoryView,DBTraceDefinedDataMemoryView,DBTraceDefinedUnitsMemoryView,DBTraceInstructionsMemoryView
TraceBaseCodeUnitsView for composing views of many address
spaces-
Nested Class Summary
Nested 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> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a composite view -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsAddress(long snap, Address address) booleancoversRange(Lifespan span, AddressRange range) booleancoversRange(TraceAddressSnapRange range) protected AddressSetViewThe address set when there is no view or space for the given range's spaceemptyOrFullIterableUndefined(long snap, AddressRange range, boolean forward) The result of iteration when there is no view or space for the given range's spaceprotected booleanThe result of contains, covers, or intersects when there is no view or space for an address spaceget(long snap, boolean forward) get(long snap, AddressRange range, boolean forward) get(long snap, AddressSetView set, boolean forward) getAddressSetView(long snap) getAddressSetView(long snap, AddressRange within) getCeiling(long snap, Address address) getContaining(long snap, Address address) getForSpace(AddressSpace space, boolean createIfAbsent) getSpace()getTrace()protected abstract MgetView(DBTraceCodeSpace space) Get the individual view from the given spacebooleanintersectsRange(Lifespan span, AddressRange range) booleanprotected AddressnextAddress(Address address) Compute the address following the givenprotected TnullOrUndefined(long snap, Address address) Create the appropriate unit (possibly caching) when there is no view or space for the given address's spaceprotected AddressprevAddress(Address address) Compute the address preceding the givenreadLock()intsize()Methods 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, delegateWriteV
-
Field Details
-
manager
-
-
Constructor Details
-
AbstractBaseDBTraceCodeUnitsMemoryView
Construct a composite view- Parameters:
manager- the code manager, from which individual views are retrieved
-
-
Method Details
-
getSpace
-
getTrace
- Returns:
- the trace
- See Also:
-
getView
Get the individual view from the given space- Parameters:
space- the space, bound to a specific address space- Returns:
- the view
-
nullOrUndefined
Create the appropriate unit (possibly caching) when there is no view or space for the given address's spaceViews composing undefined units should generate (possibly delegating to a view) an undefined unit. Others should leave this null.
- Parameters:
snap- the snap the client requestedaddress- the address the client requested- Returns:
- the unit or null
-
emptyOrFullAddressSetUndefined
The address set when there is no view or space for the given range's spaceViews composing undefined units should return the whole range. Others should leave this empty.
- Parameters:
within- the range the client requested- Returns:
- the full range or empty
-
falseOrTrueUndefined
protected boolean falseOrTrueUndefined()The result of contains, covers, or intersects when there is no view or space for an address spaceViews composing undefined units should return true, since the address is known to be in an unpopulated space. Others should leave this false.
- Returns:
- true if an undefined unit implicitly contains the address, false otherwise.
-
emptyOrFullIterableUndefined
public Iterable<? extends T> emptyOrFullIterableUndefined(long snap, AddressRange range, boolean forward) The result of iteration when there is no view or space for the given range's spaceViews composing undefiend units should return an iterable that generates (possibly caching) undefined units. Others should leave this empty.
- Parameters:
snap- the snap the client requestedrange- the range of iterationforward- true to iterate forward (min to max), false for backward (max to min)- Returns:
- an iterable of units
-
emptyOrFullIterableUndefined
- Parameters:
tasr- the range of space and time to cover- Returns:
- the iterable
- See Also:
-
readLock
- Specified by:
readLockin interfaceDBTraceDelegatingManager<T extends DBTraceCodeUnitAdapter>
-
writeLock
- Specified by:
writeLockin interfaceDBTraceDelegatingManager<T extends DBTraceCodeUnitAdapter>
-
getForSpace
- Specified by:
getForSpacein interfaceDBTraceDelegatingManager<T extends DBTraceCodeUnitAdapter>
-
prevAddress
Compute the address preceding the givenIf this address is the minimum in its space, then this will choose the maximum address of the previous space, if it exists.
- Parameters:
address- the address- Returns:
- the previous address or null
-
nextAddress
Compute the address following the givenIf the address is the maximum in its space, then this will choose the minimum address of the next space, if it exists.
- Returns:
- the next address or null
-
size
public int size()- Returns:
- the number of defined units
- See Also:
-
getBefore
- Parameters:
snap- the snapaddress- the address- Returns:
- the unit or null
- See Also:
-
getFloor
- Parameters:
snap- the snapaddress- the address- Returns:
- the unit or null
- See Also:
-
getContaining
- Parameters:
snap- the snapaddress- the address- Returns:
- the unit or null
- See Also:
-
getAt
- Parameters:
snap- the snapaddress- the address- Returns:
- the unit or null
- See Also:
-
getCeiling
- Parameters:
snap- the snapaddress- the address- Returns:
- the unit or null
- See Also:
-
getAfter
- Parameters:
snap- the snapaddress- the address- Returns:
- the unit or null
- See Also:
-
get
- Parameters:
snap- the snapmin- the min addressmax- the max addressforward- true to iterate forward- Returns:
- an iterable of units
- See Also:
-
get
- Parameters:
snap- the snapset- the address setforward- true to iterate forward- Returns:
- an iterable of units
- See Also:
-
get
- Parameters:
snap- the snaprange- the address rangeforward- true to iterate forward- Returns:
- an iterable of units
- See Also:
-
get
- Parameters:
snap- the snapstart- the start addressforward- true to iterate forward- Returns:
- an iterable of units
- See Also:
-
get
- Parameters:
snap- the snapforward- true to iterate forward- Returns:
- an iterable of units
- See Also:
-
getIntersecting
- Parameters:
tasr- the range in space and time to cover- Returns:
- an iterable of units
- See Also:
-
getAddressSetView
- Parameters:
snap- the snapwithin- the range to consider- Returns:
- the address set
- See Also:
-
getAddressSetView
- Parameters:
snap- the snap- Returns:
- the address set
- See Also:
-
containsAddress
- Parameters:
snap- the snapaddress- the address- Returns:
- true if contained
- See Also:
-
coversRange
- Parameters:
span- the spanrange- the range- Returns:
- true if covered
- See Also:
-
coversRange
- Parameters:
range- the range in space and time- Returns:
- true if covered
- See Also:
-
intersectsRange
- Parameters:
span- the spanrange- the range- Returns:
- true if intersected
- See Also:
-
intersectsRange
- Parameters:
range- the range in space and time- Returns:
- true if intersected
- See Also:
-