Package ghidra.app.decompiler
Class ClangVariableToken
java.lang.Object
ghidra.app.decompiler.ClangToken
ghidra.app.decompiler.ClangVariableToken
- All Implemented Interfaces:
ClangNode
Token representing a C variable
-
Field Summary
Fields inherited from class ghidra.app.decompiler.ClangToken
COMMENT_COLOR, CONST_COLOR, DEFAULT_COLOR, ERROR_COLOR, FUNCTION_COLOR, GLOBAL_COLOR, KEYWORD_COLOR, MAX_COLOR, PARAMETER_COLOR, SPECIAL_COLOR, TYPE_COLOR, VARIABLE_COLOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddecode(Decoder decoder, PcodeFactory pfactory) Decode this token from the current position in an encoded streamgetHighSymbol(HighFunction highFunction) Get the symbol associated with this token or null otherwise.Get the high-level variable associate with this token or null otherwiseGet the biggest Program address associated with the code that this text representsGet the smallest Program address associated with the code that this text representsMany tokens directly represent a pcode operator in the data-flowIf the token represents an underlying integer constant, return the constant as a Scalar.Many tokens directly represent a variable in the data-flowbooleanMethods inherited from class ghidra.app.decompiler.ClangToken
buildSpacer, buildToken, Child, flatten, getClangFunction, getHighlight, getLineParent, getSyntaxType, getText, isMatchingToken, iterator, numChildren, Parent, setHighlight, setLineParent, setMatchingToken, toString
-
Constructor Details
-
ClangVariableToken
-
-
Method Details
-
getVarnode
Description copied from class:ClangTokenMany tokens directly represent a variable in the data-flow- Overrides:
getVarnodein classClangToken- Returns:
- the variable (Varnode) associated with this token or null
-
getPcodeOp
Description copied from class:ClangTokenMany tokens directly represent a pcode operator in the data-flow- Overrides:
getPcodeOpin classClangToken- Returns:
- the operation (PcodeOp) associated with this token or null
-
getScalar
Description copied from class:ClangTokenIf the token represents an underlying integer constant, return the constant as a Scalar. Otherwise return null.- Overrides:
getScalarin classClangToken- Returns:
- the Scalar that the token represents or null
-
isVariableRef
public boolean isVariableRef()- Overrides:
isVariableRefin classClangToken- Returns:
- true if this token represents a variable (in source code)
-
getMinAddress
Description copied from interface:ClangNodeGet the smallest Program address associated with the code that this text represents- Specified by:
getMinAddressin interfaceClangNode- Overrides:
getMinAddressin classClangToken- Returns:
- the smallest Address
-
getMaxAddress
Description copied from interface:ClangNodeGet the biggest Program address associated with the code that this text represents- Specified by:
getMaxAddressin interfaceClangNode- Overrides:
getMaxAddressin classClangToken- Returns:
- the biggest Address
-
getHighVariable
Description copied from class:ClangTokenGet the high-level variable associate with this token or null otherwise- Overrides:
getHighVariablein classClangToken- Returns:
- HighVariable
-
getHighSymbol
Description copied from class:ClangTokenGet the symbol associated with this token or null otherwise. This token may be directly associated with the symbol or a reference, in which case the symbol is looked up in the containing HighFunction- Overrides:
getHighSymbolin classClangToken- Parameters:
highFunction- is the function- Returns:
- HighSymbol
-
decode
Description copied from class:ClangTokenDecode this token from the current position in an encoded stream- Overrides:
decodein classClangToken- Parameters:
decoder- is the decoder for the streampfactory- is used to look up p-code objects associated with the token- Throws:
DecoderException- for problems decoding the stream
-