Package ghidra.program.util
Class VariableLocFieldLocation
java.lang.Object
ghidra.program.util.ProgramLocation
ghidra.program.util.FunctionLocation
ghidra.program.util.VariableLocation
ghidra.program.util.VariableLocFieldLocation
- All Implemented Interfaces:
Cloneable
,Comparable<ProgramLocation>
The
VariableLocFieldLocation
class provides specific information
about the stack variable offset field within a program location.-
Field Summary
Fields inherited from class ghidra.program.util.FunctionLocation
functionAddr
Fields inherited from class ghidra.program.util.ProgramLocation
addr, program, refAddr
-
Constructor Summary
ConstructorDescriptionShould only be used by XML restoration.VariableLocFieldLocation
(Program program, Address locationAddr, Variable var, int charOffset) Construct a new VariableLocFieldLocation object.VariableLocFieldLocation
(Program program, Variable var, int charOffset) Construct a new VariableLocFieldLocation object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getLoc()
Gets the location string.int
hashCode()
void
restoreState
(Program program1, SaveState obj) Restore this function location using the given program and save state object.void
Save this function location to the given save state object.Methods inherited from class ghidra.program.util.VariableLocation
compareTo, getVariable, isLocationFor, isParameter, isReturn, isValid, toString
Methods inherited from class ghidra.program.util.FunctionLocation
getFunctionAddress
Methods inherited from class ghidra.program.util.ProgramLocation
clone, compareAddr, getAddress, getByteAddress, getCharOffset, getColumn, getComponentPath, getLocation, getProgram, getRefAddress, getRow, getTranslatedCopy
-
Constructor Details
-
VariableLocFieldLocation
public VariableLocFieldLocation(Program program, Address locationAddr, Variable var, int charOffset) Construct a new VariableLocFieldLocation object.- Parameters:
program
- the program of the locationlocationAddr
- the address of the listing location (i.e., referent code unit)var
- the variable which has its location (stack offset) in the field.charOffset
- the position within the variable location (stack offset) string for this location.
-
VariableLocFieldLocation
Construct a new VariableLocFieldLocation object. Variable function entry point is the assumed listing location (i.e., referent code unit). Care should be taken if variable corresponds to an EXTERNAL function.- Parameters:
program
- the program of the locationvar
- the variable which has its location (stack offset) in the field.charOffset
- the position within the variable location (stack offset) string for this location.
-
VariableLocFieldLocation
public VariableLocFieldLocation()Should only be used by XML restoration.
-
-
Method Details
-
getLoc
Gets the location string. (For stack variables this is the offset as a string.) -
hashCode
public int hashCode()- Overrides:
hashCode
in classProgramLocation
-
equals
- Overrides:
equals
in classVariableLocation
- See Also:
-
restoreState
Description copied from class:FunctionLocation
Restore this function location using the given program and save state object.- Overrides:
restoreState
in classVariableLocation
- Parameters:
program1
- the program containing the function locationobj
- the save state object for saving the location
-
saveState
Description copied from class:FunctionLocation
Save this function location to the given save state object.- Overrides:
saveState
in classVariableLocation
- Parameters:
obj
- the save state object for saving the location
-