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>`

public class DBTraceProgramViewMemoryRegionBlock extends AbstractDBTraceProgramViewMemoryBlock

See Also:
  - Serialized Form

- ## Field Summary

  ### Fields inherited from class ghidra.trace.database.program.AbstractDBTraceProgramViewMemoryBlock

  `program`

  ### Fields inherited from interface ghidra.program.model.mem.MemoryBlock

  `ARTIFICIAL, EXECUTE, EXTERNAL_BLOCK_NAME, READ, VOLATILE, WRITE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DBTraceProgramViewMemoryRegionBlock(DBTraceProgramView program, TraceMemoryRegion region, long snap)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `checkSnapOnSet()`
  `AddressRange`
  `getAddressRange()`
  Get the address range that corresponds to this block.
  `protected AddressSpace`
  `getAddressSpace()`
  `InputStream`
  `getData()`
  Get memory data in the form of an InputStream.
  `Address`
  `getEnd()`
  Return the end address of this block.
  `int`
  `getFlags()`
  Returns block flags (i.e., permissions and attributes) as a bit mask.
  `protected String`
  `getInfoDescription()`
  `String`
  `getName()`
  Get the name of this block
  `long`
  `getSize()`
  Get the number of bytes in this block.
  `BigInteger`
  `getSizeAsBigInteger()`
  Get the number of bytes in this block.
  `Address`
  `getStart()`
  Return the starting address for this block.
  `boolean`
  `isArtificial()`
  Returns the artificial attribute state of this block.
  `boolean`
  `isExecute()`
  Returns the value of the execute property associated with this block
  `boolean`
  `isRead()`
  Returns the value of the read property associated with this block
  `boolean`
  `isVolatile()`
  Returns the volatile attribute state of this block.
  `boolean`
  `isWrite()`
  Returns the value of the write property associated with this block
  `void`
  `setArtificial(boolean a)`
  Sets the artificial attribute state associated with this block.
  `void`
  `setExecute(boolean e)`
  Sets the execute property associated with this block.
  `void`
  `setName(String name)`
  Set the name for this block (See `NamingUtilities.isValidName(String)` for naming rules).
  `void`
  `setPermissions(boolean read, boolean write, boolean execute)`
  Sets the read, write, execute permissions on this block
  `void`
  `setRead(boolean r)`
  Sets the read property associated with this block.
  `void`
  `setVolatile(boolean v)`
  Sets the volatile attribute state associated of this block.
  `void`
  `setWrite(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, setSourceName`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface ghidra.program.model.mem.MemoryBlock

  `isExternalBlock`

- ## Constructor Details

  - ### DBTraceProgramViewMemoryRegionBlock

    public DBTraceProgramViewMemoryRegionBlock(DBTraceProgramView program, TraceMemoryRegion region, long snap)

- ## Method Details

  - ### getInfoDescription

    protected String getInfoDescription()
    Specified by:
      `getInfoDescription` in class `AbstractDBTraceProgramViewMemoryBlock`

  - ### getAddressSpace

    protected AddressSpace getAddressSpace()
    Overrides:
      `getAddressSpace` in class `AbstractDBTraceProgramViewMemoryBlock`

  - ### getAddressRange

    public AddressRange getAddressRange()
    Description copied from interface: `MemoryBlock`
    Get the address range that corresponds to this block.
    Specified by:
      `getAddressRange` in interface `MemoryBlock`
    Overrides:
      `getAddressRange` in class `AbstractDBTraceProgramViewMemoryBlock`
    Returns:
      block address range

  - ### checkSnapOnSet

    protected void checkSnapOnSet()

  - ### setPermissions

    public void setPermissions(boolean read, boolean write, boolean execute)
    Description copied from interface: `MemoryBlock`
    Sets the read, write, execute permissions on this block
    Parameters:
      `read` - the read permission
      `write` - the write permission
      `execute` - the execute permission

  - ### getFlags

    public int getFlags()
    Description copied from interface: `MemoryBlock`
    Returns block flags (i.e., permissions and attributes) as a bit mask. These bits defined as `MemoryBlock.READ`, `MemoryBlock.WRITE`, `MemoryBlock.EXECUTE`, `MemoryBlock.VOLATILE`, `MemoryBlock.ARTIFICIAL`.
    Returns:
      block flag bits

  - ### getData

    public InputStream getData()
    Description copied from interface: `MemoryBlock`
    Get memory data in the form of an InputStream. Null is returned for thos memory blocks which have no data.
    Specified by:
      `getData` in interface `MemoryBlock`
    Overrides:
      `getData` in class `AbstractDBTraceProgramViewMemoryBlock`

  - ### getStart

    public Address getStart()
    Description copied from interface: `MemoryBlock`
    Return the starting address for this block.
    Returns:
      block's start address

  - ### getEnd

    public Address getEnd()
    Description copied from interface: `MemoryBlock`
    Return the end address of this block.
    Returns:
      end address of the block

  - ### getSize

    public long getSize()
    Description copied from interface: `MemoryBlock`
    Get the number of bytes in this block.
    Specified by:
      `getSize` in interface `MemoryBlock`
    Overrides:
      `getSize` in class `AbstractDBTraceProgramViewMemoryBlock`
    Returns:
      number of bytes in the block

  - ### getSizeAsBigInteger

    public BigInteger getSizeAsBigInteger()
    Description copied from interface: `MemoryBlock`
    Get the number of bytes in this block.
    Specified by:
      `getSizeAsBigInteger` in interface `MemoryBlock`
    Overrides:
      `getSizeAsBigInteger` in class `AbstractDBTraceProgramViewMemoryBlock`
    Returns:
      the number of bytes in this block as a BigInteger

  - ### getName

    public String getName()
    Description copied from interface: `MemoryBlock`
    Get the name of this block
    Returns:
      block name

  - ### setName

    public void setName(String name) throws LockException
    Description copied from interface: `MemoryBlock`
    Set the name for this block (See `NamingUtilities.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: `MemoryBlock`
    Returns 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: `MemoryBlock`
    Sets 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: `MemoryBlock`
    Returns 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: `MemoryBlock`
    Sets 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: `MemoryBlock`
    Returns 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: `MemoryBlock`
    Sets 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: `MemoryBlock`
    Returns 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: `MemoryBlock`
    Sets 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: `MemoryBlock`
    Returns 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: `MemoryBlock`
    Sets 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.