Package ghidra.app.cmd.function
Class ApplyFunctionSignatureCmd
java.lang.Object
ghidra.framework.cmd.BackgroundCommand
ghidra.app.cmd.function.ApplyFunctionSignatureCmd
- All Implemented Interfaces:
Command
Command to create apply a function signature at an address.
-
Constructor Summary
ConstructorsConstructorDescriptionApplyFunctionSignatureCmd
(Address entry, FunctionSignature signature, SourceType source) Constructs a new command for creating a function.ApplyFunctionSignatureCmd
(Address entry, FunctionSignature signature, SourceType source, boolean preserveCallingConvention, boolean forceSetName) Deprecated, for removal: This API element is subject to removal in a future version.ApplyFunctionSignatureCmd
(Address entry, FunctionSignature signature, SourceType source, boolean preserveCallingConvention, FunctionRenameOption functionRenameOption) Constructs a new command for creating a function. -
Method Summary
Modifier and TypeMethodDescriptionboolean
applyTo
(DomainObject obj, TaskMonitor monitor) Method called when this command is to apply changes to the given domain object.Methods inherited from class ghidra.framework.cmd.BackgroundCommand
applyTo, canCancel, dispose, getName, getStatusMsg, hasProgress, isModal, setStatusMsg, taskCompleted, toString
-
Constructor Details
-
ApplyFunctionSignatureCmd
Constructs a new command for creating a function. Only a function with a default name will be renamed to the function signature's name (seeFunctionRenameOption.RENAME_IF_DEFAULT
).- Parameters:
entry
- entry point address for the function to be created.signature
- function signature to applysource
- the source of this function signature
-
ApplyFunctionSignatureCmd
@Deprecated(since="10.3", forRemoval=true) public ApplyFunctionSignatureCmd(Address entry, FunctionSignature signature, SourceType source, boolean preserveCallingConvention, boolean forceSetName) Deprecated, for removal: This API element is subject to removal in a future version.Constructs a new command for creating a function.- Parameters:
entry
- entry point address for the function to be created.signature
- function signature to applysource
- the source of this function signaturepreserveCallingConvention
- if true the function calling convention will not be changedforceSetName
- true if name of the function should be set to the name, otherwise name will only be set name if currently default (e.g., FUN_1234). A value of true is equivalent toFunctionRenameOption.RENAME
, while a value of false is equivalent toFunctionRenameOption.RENAME_IF_DEFAULT
.
-
ApplyFunctionSignatureCmd
public ApplyFunctionSignatureCmd(Address entry, FunctionSignature signature, SourceType source, boolean preserveCallingConvention, FunctionRenameOption functionRenameOption) Constructs a new command for creating a function.- Parameters:
entry
- entry point address for the function to be created.signature
- function signature to applysource
- the source of this function signaturepreserveCallingConvention
- if true the function calling convention will not be changedfunctionRenameOption
- controls renaming of the function using the name from the specified function signature.
-
-
Method Details
-
applyTo
Description copied from class:BackgroundCommand
Method called when this command is to apply changes to the given domain object. A monitor is provided to display status information about the command as it executes in the background.- Specified by:
applyTo
in classBackgroundCommand
- Parameters:
obj
- domain object that will be affected by the commandmonitor
- monitor to show progress of the command- Returns:
- true if the command applied successfully
-