Package ghidra.program.util
Class FunctionSignatureFieldLocation
- java.lang.Object
-
- ghidra.program.util.ProgramLocation
-
- ghidra.program.util.FunctionLocation
-
- ghidra.program.util.FunctionSignatureFieldLocation
-
- All Implemented Interfaces:
java.lang.Comparable<ProgramLocation>
- Direct Known Subclasses:
FunctionCallingConventionFieldLocation
,FunctionEndParametersFieldLocation
,FunctionInlineFieldLocation
,FunctionNameFieldLocation
,FunctionNoReturnFieldLocation
,FunctionParameterFieldLocation
,FunctionReturnTypeFieldLocation
,FunctionStartParametersFieldLocation
,FunctionThunkFieldLocation
public class FunctionSignatureFieldLocation extends FunctionLocation
TheFunctionSignatureFieldLocation
class provides specific information about the Function Signature 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
Constructors Constructor Description FunctionSignatureFieldLocation()
Default constructor needed for restoring a program location from XMLFunctionSignatureFieldLocation(Program program, Address functionAddr)
Construct a new FunctionSignatureFieldLocation object with field-based positioning.FunctionSignatureFieldLocation(Program program, Address functionAddr, int col, java.lang.String signature)
Construct a new FunctionSignatureFieldLocation object.FunctionSignatureFieldLocation(Program program, Address locationAddr, Address functionAddr, int charOffset, java.lang.String signature)
Construct a new FunctionSignatureFieldLocation object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getSignature()
Return the function signature string at this location.int
hashCode()
boolean
isFieldBasedPositioning()
void
restoreState(Program p, SaveState obj)
Restore this function location using the given program and save state object.void
saveState(SaveState obj)
Save this function location to the given save state object.java.lang.String
toString()
Returns a String representation of this location.-
Methods inherited from class ghidra.program.util.FunctionLocation
getFunctionAddress, isValid
-
Methods inherited from class ghidra.program.util.ProgramLocation
compareAddr, compareTo, getAddress, getByteAddress, getCharOffset, getColumn, getComponentPath, getLocation, getProgram, getRefAddress, getRow
-
-
-
-
Constructor Detail
-
FunctionSignatureFieldLocation
public FunctionSignatureFieldLocation(Program program, Address locationAddr, Address functionAddr, int charOffset, java.lang.String signature)
Construct a new FunctionSignatureFieldLocation object.- Parameters:
program
- the program of the locationlocationAddr
- the address of the listing location (i.e., referent code unit)functionAddr
- the function addresscharOffset
- the character position within the function signature string for this location.signature
- the function signature String at this location.
-
FunctionSignatureFieldLocation
public FunctionSignatureFieldLocation(Program program, Address functionAddr, int col, java.lang.String signature)
Construct a new FunctionSignatureFieldLocation object.- Parameters:
program
- the program of the locationfunctionAddr
- the function addresscol
- the character position within the function signature string for this location.signature
- the function signature String at this location.
-
FunctionSignatureFieldLocation
public FunctionSignatureFieldLocation(Program program, Address functionAddr)
Construct a new FunctionSignatureFieldLocation object with field-based positioning.- Parameters:
program
- the program of the locationfunctionAddr
- the function address
-
FunctionSignatureFieldLocation
public FunctionSignatureFieldLocation()
Default constructor needed for restoring a program location from XML
-
-
Method Detail
-
isFieldBasedPositioning
public boolean isFieldBasedPositioning()
-
getSignature
public java.lang.String getSignature()
Return the function signature string at this location.
-
toString
public java.lang.String toString()
Returns a String representation of this location.- Overrides:
toString
in classFunctionLocation
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classProgramLocation
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classFunctionLocation
- See Also:
Object.equals(java.lang.Object)
-
saveState
public void saveState(SaveState obj)
Description copied from class:FunctionLocation
Save this function location to the given save state object.- Overrides:
saveState
in classFunctionLocation
- Parameters:
obj
- the save state object for saving the location
-
restoreState
public void restoreState(Program p, SaveState obj)
Description copied from class:FunctionLocation
Restore this function location using the given program and save state object.- Overrides:
restoreState
in classFunctionLocation
- Parameters:
p
- the program containing the function locationobj
- the save state object for saving the location
-
-