Package ghidra.trace.database.program
Class DBTraceProgramViewMemoryRegionBlock
java.lang.Object
ghidra.trace.database.program.AbstractDBTraceProgramViewMemoryBlock
ghidra.trace.database.program.DBTraceProgramViewMemoryRegionBlock
- All Implemented Interfaces:
MemoryBlock,Serializable,Comparable<MemoryBlock>
- See Also:
-
Field Summary
Fields inherited from class ghidra.trace.database.program.AbstractDBTraceProgramViewMemoryBlock
programFields inherited from interface ghidra.program.model.mem.MemoryBlock
ARTIFICIAL, EXECUTE, EXTERNAL_BLOCK_NAME, READ, VOLATILE, WRITE -
Constructor Summary
ConstructorsConstructorDescriptionDBTraceProgramViewMemoryRegionBlock(DBTraceProgramView program, TraceMemoryRegion region, long snap) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidGet the address range that corresponds to this block.protected AddressSpacegetData()Get memory data in the form of an InputStream.getEnd()Return the end address of this block.intgetFlags()Returns block flags (i.e., permissions and attributes) as a bit mask.protected StringgetName()Get the name of this blocklonggetSize()Get the number of bytes in this block.Get the number of bytes in this block.getStart()Return the starting address for this block.booleanReturns the artificial attribute state of this block.booleanReturns the value of the execute property associated with this blockbooleanisRead()Returns the value of the read property associated with this blockbooleanReturns the volatile attribute state of this block.booleanisWrite()Returns the value of the write property associated with this blockvoidsetArtificial(boolean a) Sets the artificial attribute state associated with this block.voidsetExecute(boolean e) Sets the execute property associated with this block.voidSet the name for this block (SeeNamingUtilities.isValidName(String)for naming rules).voidsetPermissions(boolean read, boolean write, boolean execute) Sets the read, write, execute permissions on this blockvoidsetRead(boolean r) Sets the read property associated with this block.voidsetVolatile(boolean v) Sets the volatile attribute state associated of this block.voidsetWrite(boolean w) Sets the write property associated with this block.Methods inherited from class ghidra.trace.database.program.AbstractDBTraceProgramViewMemoryBlock
compareTo, contains, getByte, getBytes, getBytes, getComment, getMemorySpace, getSourceInfos, getSourceName, getType, isInitialized, isLoaded, isMapped, isOverlay, putByte, putBytes, putBytes, setComment, setSourceNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.program.model.mem.MemoryBlock
isExternalBlock
-
Constructor Details
-
DBTraceProgramViewMemoryRegionBlock
public DBTraceProgramViewMemoryRegionBlock(DBTraceProgramView program, TraceMemoryRegion region, long snap)
-
-
Method Details
-
getInfoDescription
- Specified by:
getInfoDescriptionin classAbstractDBTraceProgramViewMemoryBlock
-
getAddressSpace
- Overrides:
getAddressSpacein classAbstractDBTraceProgramViewMemoryBlock
-
getAddressRange
Description copied from interface:MemoryBlockGet the address range that corresponds to this block.- Specified by:
getAddressRangein interfaceMemoryBlock- Overrides:
getAddressRangein classAbstractDBTraceProgramViewMemoryBlock- Returns:
- block address range
-
checkSnapOnSet
protected void checkSnapOnSet() -
setPermissions
public void setPermissions(boolean read, boolean write, boolean execute) Description copied from interface:MemoryBlockSets the read, write, execute permissions on this block- Parameters:
read- the read permissionwrite- the write permissionexecute- the execute permission
-
getFlags
public int getFlags()Description copied from interface:MemoryBlockReturns block flags (i.e., permissions and attributes) as a bit mask. These bits defined asMemoryBlock.READ,MemoryBlock.WRITE,MemoryBlock.EXECUTE,MemoryBlock.VOLATILE,MemoryBlock.ARTIFICIAL.- Returns:
- block flag bits
-
getData
Description copied from interface:MemoryBlockGet memory data in the form of an InputStream. Null is returned for thos memory blocks which have no data.- Specified by:
getDatain interfaceMemoryBlock- Overrides:
getDatain classAbstractDBTraceProgramViewMemoryBlock
-
getStart
Description copied from interface:MemoryBlockReturn the starting address for this block.- Returns:
- block's start address
-
getEnd
Description copied from interface:MemoryBlockReturn the end address of this block.- Returns:
- end address of the block
-
getSize
public long getSize()Description copied from interface:MemoryBlockGet the number of bytes in this block.- Specified by:
getSizein interfaceMemoryBlock- Overrides:
getSizein classAbstractDBTraceProgramViewMemoryBlock- Returns:
- number of bytes in the block
-
getSizeAsBigInteger
Description copied from interface:MemoryBlockGet the number of bytes in this block.- Specified by:
getSizeAsBigIntegerin interfaceMemoryBlock- Overrides:
getSizeAsBigIntegerin classAbstractDBTraceProgramViewMemoryBlock- Returns:
- the number of bytes in this block as a BigInteger
-
getName
Description copied from interface:MemoryBlockGet the name of this block- Returns:
- block name
-
setName
Description copied from interface:MemoryBlockSet the name for this block (SeeNamingUtilities.isValidName(String)for naming rules). Specified name must not conflict with an address space name.- Parameters:
name- the new name for this block.- Throws:
LockException- renaming an Overlay block without exclusive access
-
isRead
public boolean isRead()Description copied from interface:MemoryBlockReturns the value of the read property associated with this block- Returns:
- true if enabled else false
-
setRead
public void setRead(boolean r) Description copied from interface:MemoryBlockSets the read property associated with this block.- Parameters:
r- the value to set the read property to.
-
isWrite
public boolean isWrite()Description copied from interface:MemoryBlockReturns the value of the write property associated with this block- Returns:
- true if enabled else false
-
setWrite
public void setWrite(boolean w) Description copied from interface:MemoryBlockSets the write property associated with this block.- Parameters:
w- the value to set the write property to.
-
isExecute
public boolean isExecute()Description copied from interface:MemoryBlockReturns the value of the execute property associated with this block- Returns:
- true if enabled else false
-
setExecute
public void setExecute(boolean e) Description copied from interface:MemoryBlockSets the execute property associated with this block.- Parameters:
e- the value to set the execute property to.
-
isVolatile
public boolean isVolatile()Description copied from interface:MemoryBlockReturns the volatile attribute state of this block. This attribute is generally associated with block of I/O regions of memory.- Returns:
- true if enabled else false
-
setVolatile
public void setVolatile(boolean v) Description copied from interface:MemoryBlockSets the volatile attribute state associated of this block. This attribute is generally associated with block of I/O regions of memory.- Parameters:
v- the volatile attribute state.
-
isArtificial
public boolean isArtificial()Description copied from interface:MemoryBlockReturns the artificial attribute state of this block. This attribute is generally associated with blocks which have been fabricated to facilitate analysis but do not exist in the same form within a running/loaded process state.- Returns:
- true if enabled else false
-
setArtificial
public void setArtificial(boolean a) Description copied from interface:MemoryBlockSets the artificial attribute state associated with this block. This attribute is generally associated with blocks which have been fabricated to facilitate analysis but do not exist in the same form within a running/loaded process state.- Parameters:
a- the artificial attribute state.
-