Package ghidra.trace.util
Interface DataAdapterFromDataType
- All Superinterfaces:
CodeUnit,Data,MemBuffer,PropertySet,Settings
- All Known Subinterfaces:
DBTraceDataAdapter,DBTraceDefinedDataAdapter
- All Known Implementing Classes:
AbstractDBTraceDataComponent,AbstractDBTraceProgramViewListing.DBTraceProgramViewUndefinedData,DBTraceData,DBTraceDataArrayElementComponent,DBTraceDataCompositeFieldComponent,UndefinedDBTraceData
-
Field Summary
Fields 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.docking.settings.Settings
EMPTY_STRING_ARRAY -
Method Summary
Modifier and TypeMethodDescriptiondefault Stringdefault AddressgetAddress(int opIndex) Get the Address for the given operand index if one exists.default StringReturns the appropriate string to use as the default label prefix or null if it has no preferred default label prefix;default StringReturns a string that represents the data value without markup.default StringReturns the mnemonic for this code unit, e.g., MOV, JMP.default ScalargetScalar(int opIndex) Returns the scalar at the given operand index.default ObjectgetValue()Returns the value of this data as determined by the correspondingDataType.default Class<?> Get the class used to express the value of this data.default booleanReturns true if this data corresponds to string data.default booleanisArray()Returns true if this data item is an Array of DataTypesdefault booleanReturns true if this data item is a dynamic DataType.default booleanReturns true if this is a pointer, which implies getValue() will return an Object that is an Address.default booleanReturns true if this data item is a Structure.default booleanisUnion()Returns true if this data item is a Union.Methods inherited from interface ghidra.program.model.listing.CodeUnit
addMnemonicReference, addOperandReference, compareTo, contains, getAddressString, getBytes, getBytesInCodeUnit, getComment, getComment, getCommentAsArray, getCommentAsArray, getExternalReference, getLabel, getLength, getMaxAddress, getMinAddress, getMnemonicReferences, getNumOperands, getOperandReferences, getPrimaryReference, getPrimarySymbol, getProgram, getReferenceIteratorTo, getReferencesFrom, getSymbols, removeExternalReference, removeMnemonicReference, removeOperandReference, setComment, setComment, setCommentAsArray, setCommentAsArray, setPrimaryMemoryReference, setRegisterReference, setStackReferenceMethods inherited from interface ghidra.program.model.listing.Data
addValueReference, getBaseDataType, getComponent, getComponent, getComponentAt, getComponentContaining, getComponentIndex, getComponentLevel, getComponentPath, getComponentPathName, getComponentsContaining, getDataType, getFieldName, getNumComponents, getParent, getParentOffset, getPathName, getPrimitiveAt, getRoot, getRootOffset, getValueReferences, isConstant, isDefined, isImmutableSettings, isVolatile, isWritable, removeValueReferenceMethods inherited from interface ghidra.program.model.mem.MemBuffer
getAddress, getBigInteger, getByte, getBytes, getInputStream, getInputStream, getInt, getLong, getMemory, getShort, getUnsignedByte, getUnsignedInt, getUnsignedShort, getVarLengthInt, getVarLengthUnsignedInt, isBigEndian, isInitializedMemoryMethods inherited from interface ghidra.program.model.util.PropertySet
getIntProperty, getObjectProperty, getStringProperty, getVoidProperty, hasProperty, propertyNames, removeProperty, setProperty, setProperty, setProperty, setPropertyMethods inherited from interface ghidra.docking.settings.Settings
clearAllSettings, clearSetting, getDefaultSettings, getLong, getNames, getString, getSuggestedValues, getValue, isChangeAllowed, isEmpty, setLong, setString, setValue
-
Method Details
-
doToString
-
getMnemonicString
Description copied from interface:CodeUnitReturns the mnemonic for this code unit, e.g., MOV, JMP.- Specified by:
getMnemonicStringin interfaceCodeUnit- Returns:
- the mnemonic for this code unit, e.g., MOV, JMP
-
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- 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.
-
getScalar
Description copied from interface:CodeUnitReturns the scalar at the given operand index. Data objects have one operand (the value). -
getValue
Description copied from interface:Data -
getValueClass
Description copied from interface:DataGet the class used to express the value of this data.NOTE: This determination is made based upon data type and settings only and does not examine memory bytes which are used to construct the data value object.
- Specified by:
getValueClassin interfaceData- Returns:
- value class or null if a consistent value class is not utilized.
-
hasStringValue
default boolean hasStringValue()Description copied from interface:DataReturns true if this data corresponds to string data. This is determined by the corresponding data type producing a String value.- Specified by:
hasStringValuein interfaceData- Returns:
- true if this data returns a String value and can be treated as string data.
-
isPointer
default boolean isPointer()Description copied from interface:DataReturns true if this is a pointer, which implies getValue() will return an Object that is an Address. -
isUnion
default boolean isUnion()Description copied from interface:DataReturns true if this data item is a Union. -
isStructure
default boolean isStructure()Description copied from interface:DataReturns true if this data item is a Structure.- Specified by:
isStructurein interfaceData- Returns:
- true if a structure
-
isArray
default boolean isArray()Description copied from interface:DataReturns true if this data item is an Array of DataTypes -
isDynamic
default boolean isDynamic()Description copied from interface:DataReturns true if this data item is a dynamic DataType. -
getDefaultValueRepresentation
Description copied from interface:DataReturns a string that represents the data value without markup.- Specified by:
getDefaultValueRepresentationin interfaceData- Returns:
- the string
-
getDefaultLabelPrefix
Description copied from interface:DataReturns the appropriate string to use as the default label prefix or null if it has no preferred default label prefix;- Specified by:
getDefaultLabelPrefixin interfaceData- Parameters:
options- the options- Returns:
- the prefix
-