Class DBTraceLabelSymbol
- All Implemented Interfaces:
Symbol,DBTraceOverlaySpaceAdapter.DecodesAddresses,TraceLabelSymbol,TraceSymbol,TraceSymbolWithLifespan,TraceSpaceMixin
Version history:
- 1: Change
addressto 10-byte fixed encoding - 0: Initial version and previous unversioned implementation
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Addressprotected longprotected Lifespanprotected longFields inherited from class ghidra.trace.database.symbol.AbstractDBTraceSymbol
manager, parentFields inherited from class ghidra.program.database.DatabaseObject
key -
Constructor Summary
ConstructorsConstructorDescriptionDBTraceLabelSymbol(DBTraceSymbolManager manager, DBCachedObjectStore<?> store, DBRecord record) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleandoSetPrimary(boolean primary) Set the primary flag.protected voidfresh(boolean created) Extension point: Called when the object's fields are populated.Get the object's address spaceGet the code unit at this labellongGet the maximum snapshot key in the lifespanGet the lifespan of the symbollongGet the minimum snapshot key in the lifespanReturns this symbol's typeIf in register space, get the thread associated with this symbol.booleanprotected voidset(Lifespan lifespan, Address address, String name, DBTraceNamespaceSymbol parent, SourceType source) voidsetEndSnap(long endSnap) Set the maximum snapshot key in the lifespanbooleanSets this symbol to be primary.protected voidvalidateNameAndParent(String newName, DBTraceNamespaceSymbol newParent) Methods inherited from class ghidra.trace.database.symbol.AbstractDBTraceSymbol
assertIsNamespace, assertNotGlobal, checkCircular, delete, doCollectAddressSet, doDelete, doSetNameWithEvent, doSetParent, doSetSource, doSetSourceWithEvent, equals, getAddressSet, getID, getName, getName, getOverlaySpaceAdapter, getParentNamespace, getParentSymbol, getPath, getProgram, getProgramLocation, getRanges, getReferenceCollection, getReferenceCount, getReferences, getReferences, getSource, getTrace, hashCode, hasReferences, isDescendant, isDynamic, isExternal, isGlobal, isPinned, isValidParent, set, setName, setNameAndNamespace, setNamespace, setPinned, setSource, toString, validateNameAndSourceMethods 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, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ghidra.trace.database.address.DBTraceOverlaySpaceAdapter.DecodesAddresses
getOverlaySpaceAdapterMethods inherited from interface ghidra.program.model.symbol.Symbol
delete, getID, getName, getName, getPath, getProgram, getProgramLocation, getReferenceCount, getSource, hasReferences, isDeleted, isDescendant, isDynamic, isExternal, isExternalEntryPoint, isGlobal, isValidParent, setName, setNameAndNamespace, setNamespace, setSourceMethods inherited from interface ghidra.trace.util.TraceSpaceMixin
getFrameLevel, getTraceMethods inherited from interface ghidra.trace.model.symbol.TraceSymbol
getParentNamespace, getParentSymbol, getReferenceCollection, getReferences, getReferences, getTrace, isPinned, setPinned
-
Field Details
-
address
-
startSnap
protected long startSnap -
endSnap
protected long endSnap -
lifespan
-
-
Constructor Details
-
DBTraceLabelSymbol
public DBTraceLabelSymbol(DBTraceSymbolManager manager, DBCachedObjectStore<?> store, DBRecord record)
-
-
Method Details
-
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 classAbstractDBTraceSymbol- Parameters:
created-truewhen object is being created, orfalsewhen it is being loaded.- Throws:
IOException- if further initialization fails.
-
set
protected void set(Lifespan lifespan, Address address, String name, DBTraceNamespaceSymbol parent, SourceType source) -
getLifespan
Description copied from interface:TraceSymbolWithLifespanGet the lifespan of the symbol- Specified by:
getLifespanin interfaceTraceSymbolWithLifespan- Overrides:
getLifespanin classAbstractDBTraceSymbol- Returns:
- the lifespan
-
getStartSnap
public long getStartSnap()Description copied from interface:TraceSymbolWithLifespanGet the minimum snapshot key in the lifespan- Specified by:
getStartSnapin interfaceTraceSymbolWithLifespan- Returns:
- the minimum snapshot key
-
setEndSnap
public void setEndSnap(long endSnap) Description copied from interface:TraceSymbolWithLifespanSet the maximum snapshot key in the lifespan- Specified by:
setEndSnapin interfaceTraceSymbolWithLifespan- Parameters:
endSnap- the new maximum snapshot key
-
getEndSnap
public long getEndSnap()Description copied from interface:TraceSymbolWithLifespanGet the maximum snapshot key in the lifespan- Specified by:
getEndSnapin interfaceTraceSymbolWithLifespan- Returns:
- the maximum snapshot key
-
getAddressSpace
Description copied from interface:TraceSpaceMixinGet the object's address space- Specified by:
getAddressSpacein interfaceTraceSpaceMixin- Overrides:
getAddressSpacein classAbstractDBTraceSymbol- Returns:
- the address space
-
getThread
Description copied from interface:TraceSymbolIf in register space, get the thread associated with this symbol.- Specified by:
getThreadin interfaceTraceSpaceMixin- Specified by:
getThreadin interfaceTraceSymbol- Overrides:
getThreadin classAbstractDBTraceSymbol- Returns:
- the thread
-
getSymbolType
Description copied from interface:SymbolReturns this symbol's type- Specified by:
getSymbolTypein interfaceSymbol- Returns:
- symbol type
-
validateNameAndParent
protected void validateNameAndParent(String newName, DBTraceNamespaceSymbol newParent) throws DuplicateNameException - Overrides:
validateNameAndParentin classAbstractDBTraceSymbol- Throws:
DuplicateNameException
-
getAddress
- Specified by:
getAddressin interfaceSymbol- Overrides:
getAddressin classAbstractDBTraceSymbol- Returns:
- the address for the symbol.
-
getCodeUnit
Description copied from interface:TraceLabelSymbolGet the code unit at this label- Specified by:
getCodeUnitin interfaceTraceLabelSymbol- Returns:
- the code unit
-
getObject
-
doSetPrimary
protected boolean doSetPrimary(boolean primary) Set the primary flag. The caller must still callDBAnnotatedObject.update(DBObjectColumn...)forAbstractDBTraceSymbol.FLAGS_COLUMN, if this method returns true.- Returns:
- true if the primary flag was modified.
-
setPrimary
public boolean setPrimary()Description copied from interface:SymbolSets this symbol to be primary. All other symbols at the same address will be set to !primary. Only applies to non-function symbols.- Specified by:
setPrimaryin interfaceSymbol- Returns:
- returns true if the symbol was not primary and now it is, otherwise false
-
isPrimary
public boolean isPrimary()
-