Class UndefinedDBTraceData
- All Implemented Interfaces:
Settings,CodeUnit,Data,MemBuffer,MemBufferMixin,PropertySet,DBTraceCodeUnitAdapter,DBTraceDataAdapter,TraceCodeUnit,TraceData,DataAdapterFromDataType,DataAdapterFromSettings,DataAdapterMinimal,TraceSpaceMixin
- Direct Known Subclasses:
AbstractDBTraceProgramViewListing.DBTraceProgramViewUndefinedData
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Addressprotected final intprotected final Lifespanprotected final longprotected final TraceThreadprotected final DBTraceFields inherited from interface ghidra.program.model.listing.CodeUnit
COMMENT_PROPERTY, DEFINED_DATA_PROPERTY, EOL_COMMENT, INSTRUCTION_PROPERTY, MNEMONIC, PLATE_COMMENT, POST_COMMENT, PRE_COMMENT, REPEATABLE_COMMENT, SPACE_PROPERTYFields inherited from interface ghidra.trace.util.DataAdapterMinimal
DATA_OP_INDEX, EMPTY_INT_ARRAYFields inherited from interface ghidra.trace.database.listing.DBTraceDataAdapter
EMPTY_STRING_ARRAY -
Constructor Summary
ConstructorsConstructorDescriptionUndefinedDBTraceData(DBTrace trace, long snap, Address address, TraceThread thread, int frameLevel) Construct an undefined unit -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Delete this code unitGet the Address which corresponds to the offset 0.getAddress(int opIndex) Get the Address for the given operand index if one exists.Get the object's address spaceIf the dataType is a typeDef, then the typeDef's base type is returned, otherwise, the datatType is returned.Get the bounds of this unit in space and timeintgetBytes(ByteBuffer buffer, int addressOffset) Read bytes starting at this unit's address plus the given offset into the given buffergetComponent(int index) Returns the immediate n'th component or null if none exists.getComponent(int[] componentPath) Get a data item given the index path.getComponentAt(int offset) Return the first immediate child component that contains the byte at the given offset.getComponentContaining(int offset) Return the first immediate child component that contains the byte at the given offset.intGet the index of this component in its parentintGet this data's component level in its hierarchy of components.int[]Get the component path if this is a component.Returns the component path name (dot notation) for this fieldgetComponentsContaining(int offset) Returns a list of all the immediate child components that contain the byte at the given offset.Get the Data type for the data.Returns the underlying default settings for these settings or null if there are nonelongGet the end snap of this code unitGet the field name of this data item if it is "inside" another data item, otherwise return null.intGet the frame level denoted by the object's address spaceGet the language of this code unitintGet length of this code unit.Get the lifespan of this code unitReturns the ending address for this code unit..intReturn the number of components that make up this data item.Get the immediate parent data item of this data item or null if this data item is not contained in another data item.intGet the offset of this Data item from the start of its immediate parent.Returns the full path name (dot notation) for this field.Get the platform for this unitgetPrimitiveAt(int offset) Returns the primitive component containing this offset (i.e., one that does not have sub-components).getRange()Get the address range covered by this unitgetRoot()Get the highest level Data item in a hierarchy of structures containing this component.intGet the offset of this Data item from the start of the root data item of some hierarchy of structures.getSettingsSpace(boolean createIfAbsent) Get the same space from the internal settings adapterlongGet the start snap of this code unitGet the thread associated with this code unitgetTrace()Get the trace in which this code unit existsbooleanReturns true if the data type is defined.voidsetEndSnap(long endSnap) Set the end snap of this code unittoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ghidra.program.model.listing.CodeUnit
getComment, getCommentAsArray, setComment, setCommentAsArrayMethods inherited from interface ghidra.program.model.listing.Data
isImmutableSettingsMethods inherited from interface ghidra.trace.util.DataAdapterFromDataType
doToString, getDefaultLabelPrefix, getDefaultValueRepresentation, getMnemonicString, getScalar, getValue, getValueClass, hasStringValue, isArray, isDynamic, isPointer, isStructure, isUnionMethods inherited from interface ghidra.trace.util.DataAdapterFromSettings
isConstant, isVolatile, isWritableMethods inherited from interface ghidra.trace.util.DataAdapterMinimal
getNumOperands, getPrimarySymbolOrDynamicNameMethods inherited from interface ghidra.trace.database.listing.DBTraceCodeUnitAdapter
addMnemonicReference, addOperandReference, compareTo, contains, getAddressString, getBytes, getBytesInCodeUnit, getComment, getCommentAsArray, getExternalReference, getIntProperty, getLabel, getMemory, getMinAddress, getMnemonicReferences, getObjectProperty, getOperandReferences, getPrimaryReference, getPrimarySymbol, getProgram, getProperty, getReferenceIteratorTo, getReferencesFrom, getStringProperty, getSymbols, getVoidProperty, hasProperty, isBigEndian, propertyNames, removeExternalReference, removeMnemonicReference, removeOperandReference, removeProperty, setComment, setCommentAsArray, setPrimaryMemoryReference, setProperty, setProperty, setProperty, setProperty, setProperty, setRegisterReference, setStackReference, setTypedPropertyMethods inherited from interface ghidra.trace.database.listing.DBTraceDataAdapter
addValueReference, clearAllSettings, clearSetting, getLong, getNames, getSettingsDefinition, getString, getValue, getValueReferences, hasMutability, isChangeAllowed, isEmpty, removeValueReference, setLong, setString, setValueMethods inherited from interface ghidra.program.model.mem.MemBuffer
getInputStream, getInputStream, getUnsignedByte, getUnsignedInt, getUnsignedShort, getVarLengthInt, getVarLengthUnsignedInt, isInitializedMemoryMethods inherited from interface ghidra.program.model.mem.MemBufferMixin
getBigInteger, getByte, getBytes, getBytesInFull, getInt, getLong, getShortMethods inherited from interface ghidra.docking.settings.Settings
getSuggestedValues
-
Field Details
-
trace
-
snap
protected final long snap -
lifespan
-
address
-
thread
-
frameLevel
protected final int frameLevel
-
-
Constructor Details
-
UndefinedDBTraceData
public UndefinedDBTraceData(DBTrace trace, long snap, Address address, TraceThread thread, int frameLevel) Construct an undefined unit- Parameters:
trace- the tracesnap- the snapaddress- the addressthread- the thread, if in a per-thread spaceframeLevel- the frame, if in a per-frame space
-
-
Method Details
-
getAddressSpace
Description copied from interface:TraceSpaceMixinGet the object's address space- Specified by:
getAddressSpacein interfaceDBTraceCodeUnitAdapter- Specified by:
getAddressSpacein interfaceTraceSpaceMixin- Returns:
- the address space
-
delete
public void delete()Description copied from interface:TraceCodeUnitDelete this code unit- Specified by:
deletein interfaceTraceCodeUnit
-
getTrace
Description copied from interface:TraceCodeUnitGet the trace in which this code unit exists- Specified by:
getTracein interfaceDBTraceCodeUnitAdapter- Specified by:
getTracein interfaceTraceCodeUnit- Specified by:
getTracein interfaceTraceSpaceMixin- Returns:
- the trace
-
getLanguage
Description copied from interface:TraceCodeUnitGet the language of this code unitCurrently, for data units, this is always the base or "host" language of the trace. For instructions, this may be a guest language.
- Specified by:
getLanguagein interfaceTraceCodeUnit- Returns:
- the language
-
getPlatform
Description copied from interface:TraceCodeUnitGet the platform for this unit- Specified by:
getPlatformin interfaceTraceCodeUnit- Returns:
- the platform
-
getRange
Description copied from interface:TraceCodeUnitGet the address range covered by this unit- Specified by:
getRangein interfaceTraceCodeUnit- Returns:
- the range
-
getBounds
Description copied from interface:TraceCodeUnitGet the bounds of this unit in space and time- Specified by:
getBoundsin interfaceTraceCodeUnit- Returns:
- the bounds
-
getLifespan
Description copied from interface:TraceCodeUnitGet the lifespan of this code unit- Specified by:
getLifespanin interfaceTraceCodeUnit- Returns:
- the lifespan
-
getStartSnap
public long getStartSnap()Description copied from interface:TraceCodeUnitGet the start snap of this code unit- Specified by:
getStartSnapin interfaceTraceCodeUnit- Returns:
- the first snap of this unit's lifespan
-
setEndSnap
public void setEndSnap(long endSnap) Description copied from interface:TraceCodeUnitSet the end snap of this code unit- Specified by:
setEndSnapin interfaceTraceCodeUnit- Parameters:
endSnap- the last snap of this unit's lifespan
-
getEndSnap
public long getEndSnap()Description copied from interface:TraceCodeUnitGet the end snap of this code unit- Specified by:
getEndSnapin interfaceTraceCodeUnit- Returns:
- the last snap of this unit's lifespan
-
getAddress
Description copied from interface:MemBufferGet the Address which corresponds to the offset 0.- Specified by:
getAddressin interfaceMemBuffer- Returns:
- the current address of offset 0.
-
getThread
Description copied from interface:TraceCodeUnitGet the thread associated with this code unitA thread is associated with a code unit if it exists in a register space
- Specified by:
getThreadin interfaceTraceCodeUnit- Specified by:
getThreadin interfaceTraceSpaceMixin- Returns:
- the thread
-
getFrameLevel
public int getFrameLevel()Description copied from interface:TraceSpaceMixinGet the frame level denoted by the object's address spaceNote this will return 0 if the frame level is not applicable. This is the same as the innermost frame level when it is applicable. To distinguish whether or not a 0 return value is applicable, you must examine the path or schema.
- Specified by:
getFrameLevelin interfaceTraceSpaceMixin- Returns:
- the level or 0
-
getLength
public int getLength()Description copied from interface:CodeUnitGet length of this code unit. NOTE: If aninstruction length-overrideis set this method will return the reduced length. -
getMaxAddress
Description copied from interface:CodeUnitReturns the ending address for this code unit..- Specified by:
getMaxAddressin interfaceCodeUnit- Returns:
- the ending address for this code unit.
-
toString
-
getAddress
Description copied from interface:CodeUnitGet the Address for the given operand index if one exists. Data objects have one operand (the value).- Specified by:
getAddressin interfaceCodeUnit- Specified by:
getAddressin interfaceDataAdapterFromDataType- Parameters:
opIndex- index of the operand.- Returns:
- An address if the operand represents a fully qualified address (given the context), or if the operand is a Scalar treated as an address. Null is returned if no address or scalar exists on that operand.
-
getBytes
Description copied from interface:TraceCodeUnitRead bytes starting at this unit's address plus the given offset into the given bufferThis method honors the markers (position and limit) of the destination buffer. Use those markers to control the destination offset and maximum length.
- Specified by:
getBytesin interfaceMemBufferMixin- Specified by:
getBytesin interfaceTraceCodeUnit- Parameters:
buffer- the destination bufferaddressOffset- the offset from this unit's (minimum) address- Returns:
- the number of bytes read
-
isDefined
public boolean isDefined()Description copied from interface:DataReturns true if the data type is defined. Any address that has not been defined to be code or data is treated as undefined data. -
getDataType
Description copied from interface:DataGet the Data type for the data.- Specified by:
getDataTypein interfaceData- Returns:
- the data type
-
getBaseDataType
Description copied from interface:DataIf the dataType is a typeDef, then the typeDef's base type is returned, otherwise, the datatType is returned.- Specified by:
getBaseDataTypein interfaceData- Returns:
- the data type
-
getFieldName
Description copied from interface:DataGet the field name of this data item if it is "inside" another data item, otherwise return null.- Specified by:
getFieldNamein interfaceData- Returns:
- the name of this data as known from some parent data item or null if this data item is not a component of another data item.
-
getPathName
Description copied from interface:DataReturns the full path name (dot notation) for this field. This includes the symbol name at this address.- Specified by:
getPathNamein interfaceData- Returns:
- the path name
-
getComponentPathName
Description copied from interface:DataReturns the component path name (dot notation) for this field- Specified by:
getComponentPathNamein interfaceData- Returns:
- the component path name
-
getParent
Description copied from interface:DataGet the immediate parent data item of this data item or null if this data item is not contained in another data item. -
getRoot
Description copied from interface:DataGet the highest level Data item in a hierarchy of structures containing this component.- Specified by:
getRootin interfaceData- Specified by:
getRootin interfaceDBTraceDataAdapter- Returns:
- the data
-
getRootOffset
public int getRootOffset()Description copied from interface:DataGet the offset of this Data item from the start of the root data item of some hierarchy of structures.- Specified by:
getRootOffsetin interfaceData- Returns:
- the offset
-
getParentOffset
public int getParentOffset()Description copied from interface:DataGet the offset of this Data item from the start of its immediate parent.- Specified by:
getParentOffsetin interfaceData- Returns:
- the offset
-
getComponent
Description copied from interface:DataReturns the immediate n'th component or null if none exists.- Specified by:
getComponentin interfaceData- Specified by:
getComponentin interfaceTraceData- Parameters:
index- the index of the component to get.- Returns:
- the component
-
getComponent
Description copied from interface:DataGet a data item given the index path. Each integer in the array represents an index into the data item at that level.- Specified by:
getComponentin interfaceData- Specified by:
getComponentin interfaceTraceData- Parameters:
componentPath- the array of indexes to use to find the requested data item.- Returns:
- the component
-
getComponentPath
public int[] getComponentPath()Description copied from interface:DataGet the component path if this is a component. The component path is an array of integers that represent each index in the tree of data items. Top level data items have an empty array for their component path.- Specified by:
getComponentPathin interfaceData- Returns:
- the path
-
getNumComponents
public int getNumComponents()Description copied from interface:DataReturn the number of components that make up this data item. if this is an Array, return the number of elements in the array.- Specified by:
getNumComponentsin interfaceData- Returns:
- the number of components
-
getComponentAt
Description copied from interface:DataReturn the first immediate child component that contains the byte at the given offset. It is important to note that with certain datatypes there may be more than one component containing the specified offset (seeData.getComponentsContaining(int)).- Specified by:
getComponentAtin interfaceData- Specified by:
getComponentAtin interfaceTraceData- Parameters:
offset- the amount to add to this data items address to get the address of the requested data item.- Returns:
- first data component containing offset or null
-
getComponentContaining
Description copied from interface:DataReturn the first immediate child component that contains the byte at the given offset. It is important to note that with certain datatypes there may be more than one component containing the specified offset (seeData.getComponentsContaining(int)).- Specified by:
getComponentContainingin interfaceData- Specified by:
getComponentContainingin interfaceTraceData- Parameters:
offset- the amount to add to this data items address to get the- Returns:
- first data component containing offset or null address of the requested data item.
-
getComponentsContaining
Description copied from interface:DataReturns a list of all the immediate child components that contain the byte at the given offset.For a union, this will return all the components (if the offset is 0). The presence of bit-fields or zero-length components may cause multiple components to be returned.
- Specified by:
getComponentsContainingin interfaceData- Parameters:
offset- the amount to add to this data items address to get the address of the requested data item.- Returns:
- a list of all the immediate child components that contain the byte at the given offset or null if offset is out of bounds.
-
getPrimitiveAt
Description copied from interface:DataReturns the primitive component containing this offset (i.e., one that does not have sub-components). This is useful for data items which are made up of multiple layers of other data items. This method immediately goes to the lowest level data item. If the minimum offset of a component is specified, the only first component containing the offset will be considered (e.g., 0-element array).- Specified by:
getPrimitiveAtin interfaceData- Specified by:
getPrimitiveAtin interfaceDBTraceDataAdapter- Specified by:
getPrimitiveAtin interfaceTraceData- Parameters:
offset- the offset- Returns:
- primitive component containing this offset
-
getComponentIndex
public int getComponentIndex()Description copied from interface:DataGet the index of this component in its parent- Specified by:
getComponentIndexin interfaceData- Returns:
- -1 if this data item is not a component of another data item.
-
getComponentLevel
public int getComponentLevel()Description copied from interface:DataGet this data's component level in its hierarchy of components.- Specified by:
getComponentLevelin interfaceData- Returns:
- the level of this data item with 0 being the level of top data items.
-
getSettingsSpace
Description copied from interface:DBTraceDataAdapterGet the same space from the internal settings adapter- Specified by:
getSettingsSpacein interfaceDBTraceDataAdapter- Parameters:
createIfAbsent- true to create the space if its not already present- Returns:
- the space or null
-
getDefaultSettings
Description copied from interface:SettingsReturns the underlying default settings for these settings or null if there are none- Specified by:
getDefaultSettingsin interfaceSettings- Returns:
- underlying default settings or null
-