Package ghidra.app.cmd.function
Class SetVariableDataTypeCmd
- java.lang.Object
-
- ghidra.app.cmd.function.SetVariableDataTypeCmd
-
-
Constructor Summary
Constructors Constructor Description SetVariableDataTypeCmd(Address fnEntry, java.lang.String varName, DataType dataType, boolean align, boolean force, SourceType source)
Constructs a new command for setting the datatype on a stack/reg variableSetVariableDataTypeCmd(Address fnEntry, java.lang.String varName, DataType dataType, SourceType source)
Constructs a new command for setting the datatype on a stack/reg variable.SetVariableDataTypeCmd(Variable var, DataType dataType, SourceType source)
Constructs a new command for setting the datatype on a stack/reg variable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
applyTo(DomainObject obj)
Applies the command to the given domain object.java.lang.String
getName()
Returns the name of this command.java.lang.String
getStatusMsg()
Returns the status message indicating the status of the command.
-
-
-
Constructor Detail
-
SetVariableDataTypeCmd
public SetVariableDataTypeCmd(Variable var, DataType dataType, SourceType source)
Constructs a new command for setting the datatype on a stack/reg variable. Conflicting stack variables will be removed.- Parameters:
var
- the variable for which to set the datatype.dataType
- the datatype to apply to the stack variable.source
- signature source
-
SetVariableDataTypeCmd
public SetVariableDataTypeCmd(Address fnEntry, java.lang.String varName, DataType dataType, SourceType source)
Constructs a new command for setting the datatype on a stack/reg variable. Conflicting stack variables will be removed.- Parameters:
fnEntry
-varName
-dataType
-source
- signature source
-
SetVariableDataTypeCmd
public SetVariableDataTypeCmd(Address fnEntry, java.lang.String varName, DataType dataType, boolean align, boolean force, SourceType source)
Constructs a new command for setting the datatype on a stack/reg variable- Parameters:
fnEntry
-varName
-dataType
-align
- maintain proper alignment/justification if supported by implementation (ignored for non-stack variables). If false and this is a stack variable, the current stack address/offset will not change. If true, the affect is implementation dependent since alignment can not be performed without access to a compiler specification.force
- overwrite conflicting stack variablessource
- signature source
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:Command
Returns the name of this command.- Specified by:
getName
in interfaceCommand
- Returns:
- the name of this command
- See Also:
Command.getName()
-
applyTo
public boolean applyTo(DomainObject obj)
Description copied from interface:Command
Applies the command to the given domain object.- Specified by:
applyTo
in interfaceCommand
- Parameters:
obj
- domain object that this command is to be applied.- Returns:
- true if the command applied successfully
- See Also:
Command.applyTo(ghidra.framework.model.DomainObject)
-
getStatusMsg
public java.lang.String getStatusMsg()
Description copied from interface:Command
Returns the status message indicating the status of the command.- Specified by:
getStatusMsg
in interfaceCommand
- Returns:
- reason for failure, or null if the status of the command was successful
- See Also:
Command.getStatusMsg()
-
-