Package ghidra.program.util
Class FunctionLocation
java.lang.Object
ghidra.program.util.ProgramLocation
ghidra.program.util.FunctionLocation
- All Implemented Interfaces:
Cloneable
,Comparable<ProgramLocation>
- Direct Known Subclasses:
FunctionCallFixupFieldLocation
,FunctionRepeatableCommentFieldLocation
,FunctionSignatureFieldLocation
,FunctionSignatureSourceFieldLocation
,FunctionTagFieldLocation
,ThunkedFunctionFieldLocation
,VariableLocation
FunctionLocation
provides information about the location
in a program within a Function
.-
Field Summary
Fields inherited from class ghidra.program.util.ProgramLocation
addr, program, refAddr
-
Constructor Summary
ModifierConstructorDescriptionprotected
Default constructor needed for restoring a program function location from XMLprotected
FunctionLocation
(Program program, Address locationAddr, Address functionAddr, int row, int col, int charOffset) Create a new FunctionLocation. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Return the Function symbol address which may differ from the "location address" when a function is indirectly inferred via a reference.boolean
Returns true if this location represents a valid location in the given program.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.toString()
Methods inherited from class ghidra.program.util.ProgramLocation
clone, compareAddr, compareTo, getAddress, getByteAddress, getCharOffset, getColumn, getComponentPath, getLocation, getProgram, getRefAddress, getRow, getTranslatedCopy, hashCode
-
Field Details
-
functionAddr
-
-
Constructor Details
-
FunctionLocation
protected FunctionLocation(Program program, Address locationAddr, Address functionAddr, int row, int col, int charOffset) Create a new FunctionLocation.- Parameters:
program
- the program of the locationlocationAddr
- the address of the listing location (i.e., referent code unit)functionAddr
- the function addressrow
- the row in the fieldcol
- the display piece on the rowcharOffset
- the character position within the display piece specifed by row,col
-
FunctionLocation
protected FunctionLocation()Default constructor needed for restoring a program function location from XML
-
-
Method Details
-
equals
- Overrides:
equals
in classProgramLocation
- See Also:
-
getFunctionAddress
Return the Function symbol address which may differ from the "location address" when a function is indirectly inferred via a reference. WARNING: TheProgramLocation.getAddress()
should not be used to obtain the function address!- Returns:
- the function address corresponding to this program location
-
saveState
Save this function location to the given save state object.- Overrides:
saveState
in classProgramLocation
- Parameters:
obj
- the save state object for saving the location
-
restoreState
Restore this function location using the given program and save state object.- Overrides:
restoreState
in classProgramLocation
- Parameters:
program1
- the program containing the function locationobj
- the save state object for saving the location
-
isValid
Description copied from class:ProgramLocation
Returns true if this location represents a valid location in the given program.- Overrides:
isValid
in classProgramLocation
- Parameters:
p
- the program to test if this location is valid.- Returns:
- true if this location represents a valid location in the given program.
-
toString
- Overrides:
toString
in classProgramLocation
-