Package ghidra.app.cmd.data
Class CreateDataInStructureBackgroundCmd
java.lang.Object
ghidra.framework.cmd.BackgroundCommand<Program>
ghidra.app.cmd.data.CreateDataInStructureBackgroundCmd
Background command to create data across a selection inside of a structure.
-
Constructor Summary
ConstructorDescriptionCreateDataInStructureBackgroundCmd
(Address addr, int[] startPath, int length, DataType dt) Constructs a command for applying dataTypes within an existing structure across a range of components.CreateDataInStructureBackgroundCmd
(Address addr, int[] startPath, int length, DataType dt, boolean stackPointers) This is the same asCreateDataInStructureBackgroundCmd(Address, int[], int, 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
-
CreateDataInStructureBackgroundCmd
Constructs a command for applying dataTypes within an existing structure across a range of components. Simple pointer conversion will NOT be performed.- Parameters:
addr
- The address of the existing structure.startPath
- the componentPath where to begin applying the datatype.length
- the number of bytes to apply the data type to.dt
- the datatype to be applied to the range of components.
-
CreateDataInStructureBackgroundCmd
public CreateDataInStructureBackgroundCmd(Address addr, int[] startPath, int length, DataType dt, boolean stackPointers) This is the same asCreateDataInStructureBackgroundCmd(Address, int[], int, 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:
addr
- The address of the existing structure.startPath
- the componentPath where to begin applying the datatype.length
- the number of bytes to apply the data type to.dt
- the datatype to be applied to the range of components.stackPointers
- True will convert the given data type to a pointer if it is not one and the previous type was a pointer; false will not make this conversion
-
-
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
- See Also:
-