Package ghidra.program.model.pcode
Class HighVariable
- java.lang.Object
-
- ghidra.program.model.pcode.HighVariable
-
- Direct Known Subclasses:
HighConstant,HighGlobal,HighLocal,HighOther
public abstract class HighVariable extends java.lang.ObjectA High-level variable (as in a high-level language like C/C++) built out of Varnodes (low-level variables). This is a base-class
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedHighVariable(java.lang.String nm, DataType tp, Varnode rep, Varnode[] inst, HighFunction func)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattachInstances(Varnode[] inst, Varnode rep)Attach an instance or additional location the variable can be found in.DataTypegetDataType()HighFunctiongetHighFunction()Varnode[]getInstances()A variable can reside in different locations at various times.java.lang.StringgetName()VarnodegetRepresentative()intgetSize()VariableStoragegetStorage()protected voidsetHighOnInstances()Link Varnodes directly to this HighVariable
-
-
-
Constructor Detail
-
HighVariable
protected HighVariable(java.lang.String nm, DataType tp, Varnode rep, Varnode[] inst, HighFunction func)
-
-
Method Detail
-
setHighOnInstances
protected void setHighOnInstances()
Link Varnodes directly to this HighVariable
-
getHighFunction
public HighFunction getHighFunction()
- Returns:
- the high function associated with this variable.
-
getName
public java.lang.String getName()
- Returns:
- get the name of the variable
-
getSize
public int getSize()
- Returns:
- get the size of the variable
-
getDataType
public DataType getDataType()
- Returns:
- get the data type attached to the variable
-
getRepresentative
public Varnode getRepresentative()
- Returns:
- get the varnode that represents this variable
-
getInstances
public Varnode[] getInstances()
A variable can reside in different locations at various times. Get all the instances of the variable.- Returns:
- all the variables instances
-
attachInstances
public void attachInstances(Varnode[] inst, Varnode rep)
Attach an instance or additional location the variable can be found in.- Parameters:
inst- varnode where variable can reside.rep- location that variable comes into scope.
-
getStorage
public VariableStorage getStorage()
-
-