Class MemoryMapDBAdapterV3


  • public class MemoryMapDBAdapterV3
    extends java.lang.Object
    MemoryMap adapter for version 3. This version introduces the concept of sub memory blocks and FileBytes
    • Method Detail

      • createBlock

        protected MemoryBlockDB createBlock​(java.lang.String name,
                                            Address startAddress,
                                            long length,
                                            int permissions,
                                            java.util.List<ghidra.program.database.mem.SubMemoryBlock> splitBlocks)
                                     throws java.io.IOException
        Creates a new memory block.
        Parameters:
        name - the name of the block
        startAddress - the start address of the block
        length - the length of the block
        permissions - the permissions for the block
        splitBlocks - the list of subBlock objects that make up this block
        Returns:
        the new MemoryBlock
        Throws:
        java.io.IOException - if a database error occurs
      • createFileBytesBlock

        protected MemoryBlockDB createFileBytesBlock​(java.lang.String name,
                                                     Address startAddress,
                                                     long length,
                                                     FileBytes fileBytes,
                                                     long offset,
                                                     int permissions)
                                              throws java.io.IOException,
                                                     AddressOverflowException
        Creates a new memory block using a FileBytes
        Parameters:
        name - the name of the block
        startAddress - the start address of the block
        length - the length of the block
        fileBytes - the FileBytes object that provides the bytes for this block
        offset - the offset into the FileBytes object
        permissions - the permissions for the block
        Returns:
        the new MemoryBlock
        Throws:
        java.io.IOException - if a database error occurs
        AddressOverflowException - if block length is too large for the underlying space
      • updateSubBlockRecord

        protected void updateSubBlockRecord​(Record record)
                                     throws java.io.IOException
        Updates the sub memory block record.
        Parameters:
        record - the record to update.
        Throws:
        java.io.IOException - if a database IO error occurs.