Package ghidra.app.cmd.data
Class CreateDataBackgroundCmd
This command will create a data of type dataType throughout an addressSet.
If there are any existing
instructions in the area to be made into data, the command will fail. Any data
in the area will be replaced with the new dataType, except when the existing data
or the given dataType is a pointer. If the existing dataType is a pointer, then
it will be changed into a pointer to the given dataType. If the given dataType
is a pointer and the existing data is >= to the size of a pointer, it will become
a pointer to the existing type. If the existing dataType is less than the size
of a pointer, then a pointer to dataType will only be created if there are
enough undefined bytes following to make a pointer.
-
Constructor Summary
ConstructorDescriptionCreateDataBackgroundCmd
(AddressSetView addrSet, DataType dataType) Constructs a command for applying a dataType to a set of addresses.CreateDataBackgroundCmd
(AddressSetView addrSet, DataType dataType, boolean stackPointers) This is the same asCreateDataBackgroundCmd(AddressSetView, DataType)
except that it allows the caller to control whether or not a pointer data type is created when a non-pointer data type is applied at a location that previously contained a pointer data type. -
Method Summary
Modifier and TypeMethodDescriptionboolean
applyTo
(Program program, 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, run, setStatusMsg, taskCompleted, toString
-
Constructor Details
-
CreateDataBackgroundCmd
Constructs a command for applying a dataType to a set of addresses. Simple pointer conversion will NOT be performed.- Parameters:
addrSet
- The address set to fill with the given dataType.dataType
- the dataType to be applied to the address set.
-
CreateDataBackgroundCmd
This is the same asCreateDataBackgroundCmd(AddressSetView, DataType)
except that it allows the caller to control whether or not a pointer data type is created when a non-pointer data type is applied at a location that previously contained a pointer data type.- Parameters:
addrSet
- The address set to fill with the given dataType.dataType
- the dataType to be applied to the address set.stackPointers
- if true simple pointer conversion is enabled (seeDataUtilities.reconcileAppliedDataType(DataType, DataType, boolean)
).
-
-
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<Program>
- Parameters:
program
- domain object that will be affected by the commandmonitor
- monitor to show progress of the command- Returns:
- true if the command applied successfully
-