Package ghidra.util.state
Class VarnodeOperation
- java.lang.Object
-
- ghidra.program.model.pcode.Varnode
-
- ghidra.util.state.VarnodeOperation
-
public class VarnodeOperation extends Varnode
-
-
Constructor Summary
Constructors Constructor Description VarnodeOperation(PcodeOp pcodeOp, Varnode[] inputValues)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Varnode[]
getInputValues()
PcodeOp
getPCodeOp()
int
hashCode()
boolean
isAddress()
boolean
isAddrTied()
boolean
isConstant()
boolean
isFree()
boolean
isInput()
boolean
isPersistent()
boolean
isRegister()
boolean
isSimplified()
boolean
isUnaffected()
boolean
isUnique()
void
setSimplified(boolean simplified)
java.lang.String
toString()
java.lang.String
toString(Language language)
Convert this varnode to an alternate String representation based on a specified language.void
trim()
Trim a varnode in a constant space to the correct starting offset.-
Methods inherited from class ghidra.program.model.pcode.Varnode
buildXML, contains, getAddress, getDef, getDescendants, getHigh, getLoneDescend, getMergeGroup, getOffset, getPCAddress, getSize, getSpace, getWordOffset, intersects, intersects, isHash, readXML
-
-
-
-
Method Detail
-
isSimplified
public boolean isSimplified()
-
setSimplified
public void setSimplified(boolean simplified)
-
getPCodeOp
public PcodeOp getPCodeOp()
-
getInputValues
public Varnode[] getInputValues()
-
toString
public java.lang.String toString(Language language)
Description copied from class:Varnode
Convert this varnode to an alternate String representation based on a specified language.
-
isAddress
public boolean isAddress()
- Overrides:
isAddress
in classVarnode
- Returns:
- true if this varnode exists in a Memory space (vs. register etc...).
Keep in mind this varnode may also correspond to a defined register
if true is returned and
Varnode.isRegister()
return false. Memory-based registers may be indirectly addressed which leads to the distinction with registers within the register space.
-
isAddrTied
public boolean isAddrTied()
- Overrides:
isAddrTied
in classVarnode
- Returns:
- is mapped to an address
-
isConstant
public boolean isConstant()
- Overrides:
isConstant
in classVarnode
- Returns:
- true if this varnode is just a constant number
-
isInput
public boolean isInput()
-
isPersistent
public boolean isPersistent()
- Overrides:
isPersistent
in classVarnode
- Returns:
- is persistent
-
isRegister
public boolean isRegister()
- Overrides:
isRegister
in classVarnode
- Returns:
- true if this varnode exists in a Register type space. If false is returned, keep in mind this varnode may still correspond to a defined register within a memory space. Memory-based registers may be indirectly addressed which leads to the distinction with registers within the register space.
-
isUnaffected
public boolean isUnaffected()
- Overrides:
isUnaffected
in classVarnode
-
isUnique
public boolean isUnique()
-
trim
public void trim()
Description copied from class:Varnode
Trim a varnode in a constant space to the correct starting offset. Constant handles may contain constants of indeterminate size. This is where the size gets fixed, i.e. we mask off the constant to its proper size. A varnode that is ends up in pcode should call this method to ensure that varnodes always contains raw data. On the other hand, varnodes in handles are allowed to have offsets that violate size restrictions.
-
-