Package ghidra.app.cmd.function
Class ApplyFunctionSignatureCmd
- java.lang.Object
-
- ghidra.framework.cmd.BackgroundCommand
-
- ghidra.app.cmd.function.ApplyFunctionSignatureCmd
-
- All Implemented Interfaces:
Command
public class ApplyFunctionSignatureCmd extends BackgroundCommand
Command to create apply a function signature at an address.
-
-
Constructor Summary
Constructors Constructor Description ApplyFunctionSignatureCmd(Address entry, FunctionSignature signature, SourceType source)
Constructs a new command for creating a function.ApplyFunctionSignatureCmd(Address entry, FunctionSignature signature, SourceType source, boolean preserveCallingConvention, boolean setName)
Constructs a new command for creating a function.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
applyTo(DomainObject obj, TaskMonitor monitor)
Method called when this command is to apply changes to the given domain object.static DataType
settleCDataType(DataType dt, DataTypeManager dtm)
The C language assumes array datatypes are passed simply as pointers (by reference) even though other datatypes are passed by value.-
Methods inherited from class ghidra.framework.cmd.BackgroundCommand
applyTo, canCancel, dispose, getName, getStatusMsg, hasProgress, isModal, setStatusMsg, taskCompleted, toString
-
-
-
-
Constructor Detail
-
ApplyFunctionSignatureCmd
public ApplyFunctionSignatureCmd(Address entry, FunctionSignature signature, SourceType source)
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 signature
-
ApplyFunctionSignatureCmd
public ApplyFunctionSignatureCmd(Address entry, FunctionSignature signature, SourceType source, boolean preserveCallingConvention, boolean setName)
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 changedsetName
- true if name of the function should be set to the name of the signature
-
-
Method Detail
-
applyTo
public boolean applyTo(DomainObject obj, TaskMonitor monitor)
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
- See Also:
BackgroundCommand.applyTo(ghidra.framework.model.DomainObject, ghidra.util.task.TaskMonitor)
-
settleCDataType
public static DataType settleCDataType(DataType dt, DataTypeManager dtm)
The C language assumes array datatypes are passed simply as pointers (by reference) even though other datatypes are passed by value. This routine converts the datatype to the appropriate pointer in situations where we need to get at the exact type being passed by "value"- Parameters:
dt
-- Returns:
-
-