Package ghidra.program.util
Class VariableCommentFieldLocation
java.lang.Object
ghidra.program.util.ProgramLocation
ghidra.program.util.FunctionLocation
ghidra.program.util.VariableLocation
ghidra.program.util.VariableCommentFieldLocation
- All Implemented Interfaces:
Cloneable,Comparable<ProgramLocation>
The
VariableCommentFieldLocation class provides specific information
about the stack variable comment field within a program location.-
Field Summary
Fields inherited from class ghidra.program.util.FunctionLocation
functionAddrFields inherited from class ghidra.program.util.ProgramLocation
addr, program, refAddr -
Constructor Summary
ConstructorsConstructorDescriptionShould only be used by XML restoration.VariableCommentFieldLocation(Program program, Address locationAddr, Variable var, int charOffset) Construct a new VariableCommentFieldLocation object.VariableCommentFieldLocation(Program program, Variable var, int charOffset) Construct a new VariableCommentFieldLocation object. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn the function variable comment string at this location.inthashCode()voidrestoreState(Program p, SaveState obj) Restore this function location using the given program and save state object.voidSave this function location to the given save state object.Methods inherited from class ghidra.program.util.VariableLocation
compareTo, getVariable, isLocationFor, isParameter, isReturn, isValid, toStringMethods inherited from class ghidra.program.util.FunctionLocation
getFunctionAddressMethods inherited from class ghidra.program.util.ProgramLocation
clone, compareAddr, getAddress, getByteAddress, getCharOffset, getColumn, getComponentPath, getLocation, getProgram, getRefAddress, getRow, getTranslatedCopy
-
Constructor Details
-
VariableCommentFieldLocation
public VariableCommentFieldLocation(Program program, Address locationAddr, Variable var, int charOffset) Construct a new VariableCommentFieldLocation 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 comment in the field.charOffset- the position within the variable comment string for this location.
-
VariableCommentFieldLocation
Construct a new VariableCommentFieldLocation 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 comment in the field.charOffset- the position within the variable comment string for this location.
-
VariableCommentFieldLocation
public VariableCommentFieldLocation()Should only be used by XML restoration.
-
-
Method Details
-
getComment
Return the function variable comment string at this location. -
hashCode
public int hashCode()- Overrides:
hashCodein classProgramLocation
-
equals
- Overrides:
equalsin classVariableLocation
-
restoreState
Description copied from class:FunctionLocationRestore this function location using the given program and save state object.- Overrides:
restoreStatein classVariableLocation- Parameters:
p- the program containing the function locationobj- the save state object for saving the location
-
saveState
Description copied from class:FunctionLocationSave this function location to the given save state object.- Overrides:
saveStatein classVariableLocation- Parameters:
obj- the save state object for saving the location
-