Package ghidra.app.cmd.memory
Class AddInitializedMemoryBlockCmd
- java.lang.Object
-
- ghidra.app.cmd.memory.AddInitializedMemoryBlockCmd
-
- All Implemented Interfaces:
Command
public class AddInitializedMemoryBlockCmd extends java.lang.ObjectCommand for adding a new memory block initialized with a specific byte.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Stringcommentprotected booleanexecuteprotected booleanisOverlayprotected booleanisVolatileprotected longlengthprotected java.lang.Stringmessageprotected java.lang.Stringnameprotected booleanreadprotected java.lang.Stringsourceprotected Addressstartprotected booleanwrite
-
Constructor Summary
Constructors Constructor Description AddInitializedMemoryBlockCmd(java.lang.String name, java.lang.String comment, java.lang.String source, Address start, long length, boolean read, boolean write, boolean execute, boolean isVolatile, byte initialValue, boolean isOverlay)Create a new AddFileBytesMemoryBlockCmd
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapplyTo(DomainObject obj)Applies the command to the given domain object.protected MemoryBlockcreateMemoryBlock(Memory memory)java.lang.StringgetName()Returns the name of this command.java.lang.StringgetStatusMsg()Returns the status message indicating the status of the command.
-
-
-
Field Detail
-
message
protected java.lang.String message
-
name
protected final java.lang.String name
-
comment
protected final java.lang.String comment
-
source
protected final java.lang.String source
-
start
protected final Address start
-
length
protected final long length
-
read
protected final boolean read
-
write
protected final boolean write
-
execute
protected final boolean execute
-
isVolatile
protected final boolean isVolatile
-
isOverlay
protected final boolean isOverlay
-
-
Constructor Detail
-
AddInitializedMemoryBlockCmd
public AddInitializedMemoryBlockCmd(java.lang.String name, java.lang.String comment, java.lang.String source, Address start, long length, boolean read, boolean write, boolean execute, boolean isVolatile, byte initialValue, boolean isOverlay)Create a new AddFileBytesMemoryBlockCmd- Parameters:
name- the name for the new memory block.comment- the comment for the blocksource- indicates what is creating the blockstart- the start address for the the blocklength- the length of the new blockread- sets the block's read permission flagwrite- sets the block's write permission flagexecute- sets the block's execute permission flagisVolatile- sets the block's volatile flaginitialValue- the bytes value to use throught the new block.isOverlay- if true, the block will be created in a new overlay address space.
-
-
Method Detail
-
createMemoryBlock
protected MemoryBlock createMemoryBlock(Memory memory) throws LockException, MemoryConflictException, AddressOverflowException, CancelledException
-
getStatusMsg
public java.lang.String getStatusMsg()
Description copied from interface:CommandReturns the status message indicating the status of the command.- Specified by:
getStatusMsgin interfaceCommand- Returns:
- reason for failure, or null if the status of the command was successful
-
getName
public java.lang.String getName()
Description copied from interface:CommandReturns the name of this command.
-
applyTo
public boolean applyTo(DomainObject obj)
Description copied from interface:CommandApplies the command to the given domain object.
-
-