Package ghidra.program.util
Class EquateOperandFieldLocation
java.lang.Object
ghidra.program.util.ProgramLocation
ghidra.program.util.CodeUnitLocation
ghidra.program.util.OperandFieldLocation
ghidra.program.util.EquateOperandFieldLocation
- All Implemented Interfaces:
Cloneable
,Comparable<ProgramLocation>
A simple version of
OperandFieldLocation
that allows us to store equate information.-
Field Summary
Fields inherited from class ghidra.program.util.ProgramLocation
addr, program, refAddr
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the equate at this operand field location.long
void
restoreState
(Program p, SaveState obj) Restore this program location using the given program and save state object.void
Save this program location to the given save state object.toString()
Returns a String representation of this location.Methods inherited from class ghidra.program.util.OperandFieldLocation
getOperandIndex, getOperandRepresentation, getSubOperandIndex, getVariableOffset, hashCode
Methods inherited from class ghidra.program.util.CodeUnitLocation
isValid
Methods inherited from class ghidra.program.util.ProgramLocation
clone, compareAddr, compareTo, getAddress, getByteAddress, getCharOffset, getColumn, getComponentPath, getLocation, getProgram, getRefAddress, getRow, getTranslatedCopy
-
Constructor Details
-
EquateOperandFieldLocation
public EquateOperandFieldLocation(Program program, Address addr, Address refAddr, String rep, Equate equate, int opIndex, int subOpIndex, int charOffset) - Parameters:
program
- The programaddr
- the address of the locationrefAddr
- the reference address.rep
- the representation of the equate locationequate
- the equate object.opIndex
- the operand indexsubOpIndex
- the operand subOpIndexcharOffset
- the character offset in to subOpPiece.
-
EquateOperandFieldLocation
public EquateOperandFieldLocation()Default constructor needed for restoring an operand field location from XML.
-
-
Method Details
-
getEquate
Returns the equate at this operand field location.- Returns:
- equate
-
getEquateValue
public long getEquateValue() -
getReferences
-
toString
Returns a String representation of this location.- Overrides:
toString
in classOperandFieldLocation
-
equals
- Overrides:
equals
in classOperandFieldLocation
- See Also:
-
restoreState
Description copied from class:ProgramLocation
Restore this program location using the given program and save state object.- Overrides:
restoreState
in classOperandFieldLocation
- Parameters:
p
- program to restore fromobj
- the save state to restore from
-
saveState
Description copied from class:ProgramLocation
Save this program location to the given save state object.- Overrides:
saveState
in classOperandFieldLocation
- Parameters:
obj
- the save state object for saving the location
-