Class UpdateFunctionCommand

java.lang.Object
ghidra.app.cmd.function.UpdateFunctionCommand
All Implemented Interfaces:
Command<Program>

public class UpdateFunctionCommand extends Object implements Command<Program>
A command to update Function signature in its entirety including optional custom storage. If the function does not rely on custom storage the use of ApplyFunctionSignatureCmd may be more appropriate.
  • Constructor Details

    • UpdateFunctionCommand

      public UpdateFunctionCommand(Function function, Function.FunctionUpdateType updateType, String callingConvention, Variable returnVar, List<? extends Variable> params, SourceType source, boolean force)
      Construct command to update a Function signature including optional custom storage. VariableStorage.UNASSIGNED_STORAGE should be specified when not using custom storage or storage is unknown.
      Parameters:
      function - function to be modified
      updateType - indicates how function should be updated including the use of custom or non-custom storage.
      callingConvention - a valid calling convention name or null if no change is required. Calling conventions are limited to "default", "unknown" or those defined by the associated compiler specification.
      returnVar - function return type and storage.
      params - function parameter list (specifics depend on specified updateType).
      source - the source of these parameters which will be applied to the parameter symbols and overall function signature source. If parameter names are null, or a default name, a SourceType.DEFAULT will be applied to the corresponding parameter symbol.
      force - if true any conflicting local parameters will be removed
  • Method Details

    • applyTo

      public boolean applyTo(Program obj)
      Description copied from interface: Command
      Applies the command to the given domain object.
      Specified by:
      applyTo in interface Command<Program>
      Parameters:
      obj - domain object that this command is to be applied.
      Returns:
      true if the command applied successfully
    • getStatusMsg

      public String getStatusMsg()
      Description copied from interface: Command
      Returns the status message indicating the status of the command.
      Specified by:
      getStatusMsg in interface Command<Program>
      Returns:
      reason for failure, or null if the status of the command was successful
    • getName

      public String getName()
      Description copied from interface: Command
      Returns the name of this command.
      Specified by:
      getName in interface Command<Program>
      Returns:
      the name of this command