Package ghidra.trace.database.listing
Class DBTraceUndefinedDataView
java.lang.Object
ghidra.trace.database.listing.AbstractBaseDBTraceCodeUnitsView<UndefinedDBTraceData>
ghidra.trace.database.listing.AbstractSingleDBTraceCodeUnitsView<UndefinedDBTraceData>
ghidra.trace.database.listing.DBTraceUndefinedDataView
- All Implemented Interfaces:
InternalBaseCodeUnitsView<TraceData>,TraceBaseCodeUnitsView<TraceData>,TraceUndefinedDataView
public class DBTraceUndefinedDataView
extends AbstractSingleDBTraceCodeUnitsView<UndefinedDBTraceData>
implements TraceUndefinedDataView, InternalBaseCodeUnitsView<TraceData>
The implementation of
TraceCodeOperations.undefinedData()-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Map<Long, CachedAddressSetView> protected static final intprotected final DBTraceCodeManagerFields inherited from class ghidra.trace.database.listing.AbstractBaseDBTraceCodeUnitsView
space -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsAddress(long snap, Address address) Check if the given address is contained by a live unitbooleancoversRange(Lifespan lifespan, AddressRange range) Check if the given span of snaps and range of addresses is covered by the unitsprotected UndefinedDBTraceDatadoCreateUnit(long snap, Address address) Generate an undefined data unit at the given pointprotected AddressSetViewdoGetAddressSetView(long snap) Get an address set view for optimizing various queriesIterable<? extends UndefinedDBTraceData> Get the live units whose start addresses are within the specified rangegetAddressSetView(long snap, AddressRange within) Get all addresses contained by live units at the given snap, within a restricted rangeGet the unit starting at exactly this address Note that the unit need only contain the given snapgetCeiling(long snap, Address address) Get the nearest live unit whose start address is at or after the given addressgetContaining(long snap, Address address) Get the live unit containing the given addressGet the nearest live unit whose start address is at or before the given addressIterable<? extends UndefinedDBTraceData> Get the units which intersect the given box, in no particular orderbooleanintersectsRange(Lifespan lifespan, AddressRange range) Check if the given span of snaps and range of addresses intersects any unitvoidInvalidate the cache of generated undefined unitsintsize()Get the total number of defined units in this viewMethods inherited from class ghidra.trace.database.listing.AbstractBaseDBTraceCodeUnitsView
coversRange, get, get, get, get, getAddressSetView, getAddressSpace, getAfter, getBefore, getSpace, getTrace, intersectsRangeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.trace.database.listing.InternalBaseCodeUnitsView
get, getContaining, getForRegister, getSpaceMethods inherited from interface ghidra.trace.model.listing.TraceBaseCodeUnitsView
coversRange, get, get, get, get, get, getAddressSetView, getAfter, getBefore, getContaining, getForRegister, getTrace, intersectsRange
-
Field Details
-
CACHE_MAX_SNAPS
protected static final int CACHE_MAX_SNAPS- See Also:
-
manager
-
cache
-
-
Constructor Details
-
DBTraceUndefinedDataView
Construct the view- Parameters:
space- the space, bound to an address space
-
-
Method Details
-
doCreateUnit
Generate an undefined data unit at the given point- Parameters:
snap- the snap of the unitaddress- the address of the unit- Returns:
- the unit
-
size
public int size()Description copied from interface:TraceBaseCodeUnitsViewGet the total number of defined units in this view- Specified by:
sizein interfaceTraceBaseCodeUnitsView<TraceData>- Specified by:
sizein classAbstractBaseDBTraceCodeUnitsView<UndefinedDBTraceData>- Returns:
- the size
- See Also:
-
doGetAddressSetView
Get an address set view for optimizing various queriesAs its code may suggest, this creates the lazy address set view
all - definedUnits, and wraps it in a cached address set view.- Parameters:
snap- the snapshot key for the address set- Returns:
- the address set
-
containsAddress
Description copied from interface:TraceBaseCodeUnitsViewCheck if the given address is contained by a live unit- Specified by:
containsAddressin interfaceTraceBaseCodeUnitsView<TraceData>- Specified by:
containsAddressin classAbstractBaseDBTraceCodeUnitsView<UndefinedDBTraceData>- Parameters:
snap- the snap during which the unit must be aliveaddress- the address to check- Returns:
- true if it is contained, false if not
- See Also:
-
coversRange
Description copied from interface:TraceBaseCodeUnitsViewCheck if the given span of snaps and range of addresses is covered by the unitsThis checks if every (snap, address) point within the given box is contained within some code unit in this view.
- Specified by:
coversRangein interfaceTraceBaseCodeUnitsView<TraceData>- Specified by:
coversRangein classAbstractBaseDBTraceCodeUnitsView<UndefinedDBTraceData>- Parameters:
lifespan- the span of snapsrange- the address range- Returns:
- true if covered, false otherwise
- See Also:
-
intersectsRange
Description copied from interface:TraceBaseCodeUnitsViewCheck if the given span of snaps and range of addresses intersects any unitThis checks if any (snap, address) point within the given box is contained within some code unit in this view.
- Specified by:
intersectsRangein interfaceTraceBaseCodeUnitsView<TraceData>- Specified by:
intersectsRangein classAbstractBaseDBTraceCodeUnitsView<UndefinedDBTraceData>- Parameters:
lifespan- the span of snapsrange- the address range- Returns:
- true if intersecting, false otherwise
- See Also:
-
getFloor
Description copied from interface:TraceBaseCodeUnitsViewGet the nearest live unit whose start address is at or before the given address- Specified by:
getFloorin interfaceTraceBaseCodeUnitsView<TraceData>- Specified by:
getFloorin classAbstractBaseDBTraceCodeUnitsView<UndefinedDBTraceData>- Parameters:
snap- the snap during which the unit must be aliveaddress- the address which the unit's start must equal or precede- Returns:
- the code unit, or
nullif it doesn't exist - See Also:
-
getContaining
Description copied from interface:TraceBaseCodeUnitsViewGet the live unit containing the given address- Specified by:
getContainingin interfaceTraceBaseCodeUnitsView<TraceData>- Specified by:
getContainingin classAbstractBaseDBTraceCodeUnitsView<UndefinedDBTraceData>- Parameters:
snap- the snap during which the unit must be aliveaddress- the address which the unit must contain- Returns:
- the code unit, or
nullif it doesn't exist - See Also:
-
getAt
Description copied from interface:TraceBaseCodeUnitsViewGet the unit starting at exactly this address Note that the unit need only contain the given snap- Specified by:
getAtin interfaceTraceBaseCodeUnitsView<TraceData>- Specified by:
getAtin classAbstractBaseDBTraceCodeUnitsView<UndefinedDBTraceData>- Parameters:
snap- the snap during which the unit must be aliveaddress- the unit's start address- Returns:
- the code unit, or
nullif it doesn't exist - See Also:
-
getCeiling
Description copied from interface:TraceBaseCodeUnitsViewGet the nearest live unit whose start address is at or after the given address- Specified by:
getCeilingin interfaceTraceBaseCodeUnitsView<TraceData>- Specified by:
getCeilingin classAbstractBaseDBTraceCodeUnitsView<UndefinedDBTraceData>- Parameters:
snap- the snap during which the unit must be aliveaddress- the address which the unit's start must equal or follow- Returns:
- the code unit, or
nullif it doesn't exist - See Also:
-
get
public Iterable<? extends UndefinedDBTraceData> get(long snap, Address min, Address max, boolean forward) Description copied from interface:TraceBaseCodeUnitsViewGet the live units whose start addresses are within the specified range- Specified by:
getin interfaceTraceBaseCodeUnitsView<TraceData>- Specified by:
getin classAbstractBaseDBTraceCodeUnitsView<UndefinedDBTraceData>- Parameters:
snap- the snap during which the units must be alivemin- the minimum start address, inclusivemax- the maximum start address, inclusiveforward- true to order the units by increasing address, false for descending- Returns:
- the iterable of units
- See Also:
-
getIntersecting
Description copied from interface:TraceBaseCodeUnitsViewGet the units which intersect the given box, in no particular order- Specified by:
getIntersectingin interfaceTraceBaseCodeUnitsView<TraceData>- Specified by:
getIntersectingin classAbstractBaseDBTraceCodeUnitsView<UndefinedDBTraceData>- Parameters:
tasr- the box (snap range by address range)- Returns:
- an iterable over the intersecting units
- See Also:
-
getAddressSetView
Description copied from interface:TraceBaseCodeUnitsViewGet all addresses contained by live units at the given snap, within a restricted rangeNote that the ranges in this set may not be coalesced. If a coalesced set is required, wrap it with
UnionAddressSetView. The returned ranges are not necessarily enclosed bywithin, but they will intersect it. If strict enclosure is required, wrap the set withIntersectionAddressSetView.- Specified by:
getAddressSetViewin interfaceTraceBaseCodeUnitsView<TraceData>- Specified by:
getAddressSetViewin classAbstractBaseDBTraceCodeUnitsView<UndefinedDBTraceData>- Parameters:
snap- the snap during which the units must be alivewithin- the range to restrict the view- Returns:
- a (lazy) view of the address set
- See Also:
-
invalidateCache
public void invalidateCache()Invalidate the cache of generated undefined units
-