Class DBTraceStaticMapping
- All Implemented Interfaces:
DBTraceOverlaySpaceAdapter.DecodesAddresses,TraceStaticMapping,TraceUniqueObject
Version history:
- 1: Change
traceAddressto 10-byte fixed encoding - 0: Initial version and previous unversioned implementation
-
Field Summary
FieldsFields inherited from class ghidra.program.database.DatabaseObject
key -
Constructor Summary
ConstructorsConstructorDescriptionDBTraceStaticMapping(DBTraceStaticMappingManager manager, DBCachedObjectStore<?> store, DBRecord record) -
Method Summary
Modifier and TypeMethodDescriptionbooleanconflictsWith(AddressRange range, Lifespan lifespan, URL toProgramURL, String toAddress) Check if this mapping would conflict with the given prospective mappingvoiddelete()Remove this mapping from the "from" traceprotected voidfresh(boolean created) Extension point: Called when the object's fields are populated.longGet the ending snap of the lifespanlongGet the length of the mapping, i.e., the length of the rangeGet the span of time of the mappingGet the "from" range's maximum addressGet the "from" range's minimum addressGet the space adapter for the trace containing the objectlonggetShift()Get the shift in offset from static program to dynamic tracelongGet the starting snap of the lifespanGet the "to" address range's minimum address, as a stringGet the Ghidra URL of the "to"Program, i.e., static imagegetTrace()Get the "from" trace, i.e., the trace containing this mappingGet the "from" rangeprotected static longparseOffset(String addrStr) protected static StringparseSpace(String addrStr) toString()Methods inherited from class ghidra.util.database.DBAnnotatedObject
doRefresh, doUpdateAll, doUpdated, doWrite, getObjectKey, getTableName, isDeleted, refresh, refresh, update, update, update, updateMethods inherited from class ghidra.program.database.DatabaseObject
checkDeleted, checkIsValid, checkIsValid, getKey, isDeleted, isInvalid, keyChanged, setDeleted, setInvalid, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ghidra.trace.model.TraceUniqueObject
getObjectKey, isDeleted
-
Field Details
-
TABLE_NAME
- See Also:
-
-
Constructor Details
-
DBTraceStaticMapping
public DBTraceStaticMapping(DBTraceStaticMappingManager manager, DBCachedObjectStore<?> store, DBRecord record)
-
-
Method Details
-
parseSpace
-
parseOffset
-
toString
-
fresh
Description copied from class:DBAnnotatedObjectExtension point: Called when the object's fields are populated.This provides an opportunity for the object to initialize any non-database-backed fields that depend on the database-backed fields. Note that its use may indicate a situation better solved by a custom
DBCachedObjectStoreFactory.DBFieldCodec. If both the database-backed and non-database-backed fields are used frequently, then a codec may not be indicated. If the database-backed fields are only used in this method or to encode another frequently-used field, then a codec is likely better.For a new object, the database-backed fields remain at their initial values. They will be saved after this method returns, so they may be further initialized with custom logic.
For an object loaded from the database, the database-backed fields are already populated from the record when this method is called. They are not automatically saved after this method returns. This method should not further initialize database-backed fields in this case.
- Overrides:
freshin classDBAnnotatedObject- Parameters:
created-truewhen object is being created, orfalsewhen it is being loaded.- Throws:
IOException- if further initialization fails.
-
getOverlaySpaceAdapter
Description copied from interface:DBTraceOverlaySpaceAdapter.DecodesAddressesGet the space adapter for the trace containing the object- Specified by:
getOverlaySpaceAdapterin interfaceDBTraceOverlaySpaceAdapter.DecodesAddresses- Returns:
- the adapter
-
getTrace
Description copied from interface:TraceStaticMappingGet the "from" trace, i.e., the trace containing this mapping- Specified by:
getTracein interfaceTraceStaticMapping- Returns:
- the trace
-
getTraceAddressRange
Description copied from interface:TraceStaticMappingGet the "from" range- Specified by:
getTraceAddressRangein interfaceTraceStaticMapping- Returns:
- the range
-
getMinTraceAddress
Description copied from interface:TraceStaticMappingGet the "from" range's minimum address- Specified by:
getMinTraceAddressin interfaceTraceStaticMapping- Returns:
- the minimum address
-
getMaxTraceAddress
Description copied from interface:TraceStaticMappingGet the "from" range's maximum address- Specified by:
getMaxTraceAddressin interfaceTraceStaticMapping- Returns:
- the maximum address
-
getLength
public long getLength()Description copied from interface:TraceStaticMappingGet the length of the mapping, i.e., the length of the range- Specified by:
getLengthin interfaceTraceStaticMapping- Returns:
- the length, where 0 indicates
1 << 64
-
getShift
public long getShift()Description copied from interface:TraceStaticMappingGet the shift in offset from static program to dynamic trace- Specified by:
getShiftin interfaceTraceStaticMapping- Returns:
- the shift
-
getLifespan
Description copied from interface:TraceStaticMappingGet the span of time of the mapping- Specified by:
getLifespanin interfaceTraceStaticMapping- Returns:
- the lifespan
-
getStartSnap
public long getStartSnap()Description copied from interface:TraceStaticMappingGet the starting snap of the lifespan- Specified by:
getStartSnapin interfaceTraceStaticMapping- Returns:
- the start snap
-
getEndSnap
public long getEndSnap()Description copied from interface:TraceStaticMappingGet the ending snap of the lifespan- Specified by:
getEndSnapin interfaceTraceStaticMapping- Returns:
- the end snap
-
getStaticProgramURL
Description copied from interface:TraceStaticMappingGet the Ghidra URL of the "to"Program, i.e., static image- Specified by:
getStaticProgramURLin interfaceTraceStaticMapping- Returns:
- the program URL
-
getStaticAddress
Description copied from interface:TraceStaticMappingGet the "to" address range's minimum address, as a string- Specified by:
getStaticAddressin interfaceTraceStaticMapping- Returns:
- the address string
-
delete
public void delete()Description copied from interface:TraceStaticMappingRemove this mapping from the "from" trace- Specified by:
deletein interfaceTraceStaticMapping
-
conflictsWith
public boolean conflictsWith(AddressRange range, Lifespan lifespan, URL toProgramURL, String toAddress) Description copied from interface:TraceStaticMappingCheck if this mapping would conflict with the given prospective mapping- Specified by:
conflictsWithin interfaceTraceStaticMapping- Parameters:
range- the range in the trace ("from")lifespan- the span of time in the tracetoProgramURL- the (Ghidra) URL of the static image ("to")toAddress- the starting address (in string form) in the staic image ("to")- Returns:
- true if this mapping conflicts.
- See Also:
-