Package ghidra.program.model.listing
Interface Parameter
-
- All Known Implementing Classes:
AutoParameterImpl
,ParameterImpl
,ReturnParameterDB
,ReturnParameterImpl
public interface Parameter extends Variable
Interface for function parameters
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
RETURN_NAME
static int
RETURN_ORIDINAL
static int
UNASSIGNED_ORDINAL
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AutoParameterType
getAutoParameterType()
If this is an auto-parameter this method will indicate its type.DataType
getFormalDataType()
Get the original formal signature data type before a possible forced indirect was possibly imposed by the functions calling convention.int
getOrdinal()
Returns the ordinal (index) of this parameter within the function signature.boolean
isAutoParameter()
boolean
isForcedIndirect()
If this parameter which was forced by the associated calling convention to be passed as a pointer instead of its original formal type.-
Methods inherited from interface ghidra.program.model.listing.Variable
getComment, getDataType, getFirstStorageVarnode, getFirstUseOffset, getFunction, getLastStorageVarnode, getLength, getMinAddress, getName, getProgram, getRegister, getRegisters, getSource, getStackOffset, getSymbol, getVariableStorage, hasAssignedStorage, hasStackStorage, isCompoundVariable, isEquivalent, isMemoryVariable, isRegisterVariable, isStackVariable, isUniqueVariable, isValid, setComment, setDataType, setDataType, setDataType, setName
-
-
-
-
Field Detail
-
RETURN_NAME
static final java.lang.String RETURN_NAME
- See Also:
- Constant Field Values
-
RETURN_ORIDINAL
static final int RETURN_ORIDINAL
- See Also:
- Constant Field Values
-
UNASSIGNED_ORDINAL
static final int UNASSIGNED_ORDINAL
- See Also:
- Constant Field Values
-
-
Method Detail
-
getOrdinal
int getOrdinal()
Returns the ordinal (index) of this parameter within the function signature.
-
isAutoParameter
boolean isAutoParameter()
- Returns:
- true if this parameter is automatically generated based upon the associated function calling convention and function signature. An example of such a parameter include the "__return_storage_ptr__" parameter.
-
getAutoParameterType
AutoParameterType getAutoParameterType()
If this is an auto-parameter this method will indicate its type.- Returns:
- auto-parameter type of null if not applicable.
-
isForcedIndirect
boolean isForcedIndirect()
If this parameter which was forced by the associated calling convention to be passed as a pointer instead of its original formal type.- Returns:
- true if this parameter was forced to be passed as a pointer instead of its original formal type
-
getFormalDataType
DataType getFormalDataType()
Get the original formal signature data type before a possible forced indirect was possibly imposed by the functions calling convention. TheVariable.getDataType()
method will always return the effective data type which corresponds to the allocated variable storage.- Returns:
- Formal data type. This type will only differ from the
Variable.getDataType()
value if this parameter isForcedIndirect.
-
-