Package ghidra.program.database.mem
Class MemoryMapDBAdapterV3
- java.lang.Object
-
- ghidra.program.database.mem.MemoryMapDBAdapterV3
-
public class MemoryMapDBAdapterV3 extends java.lang.ObjectMemoryMap adapter for version 3. This version introduces the concept of sub memory blocks and FileBytes
-
-
Constructor Summary
Constructors Constructor Description MemoryMapDBAdapterV3(DBHandle handle, MemoryMapDB memMap, long maxSubBlockSize, boolean create)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MemoryBlockDBcreateBlock(java.lang.String name, Address startAddress, long length, int permissions, java.util.List<ghidra.program.database.mem.SubMemoryBlock> splitBlocks)Creates a new memory block.protected MemoryBlockDBcreateFileBytesBlock(java.lang.String name, Address startAddress, long length, FileBytes fileBytes, long offset, int permissions)Creates a new memory block using a FileBytesprotected voidupdateSubBlockRecord(DBRecord record)Updates the sub memory block record.
-
-
-
Constructor Detail
-
MemoryMapDBAdapterV3
public MemoryMapDBAdapterV3(DBHandle handle, MemoryMapDB memMap, long maxSubBlockSize, boolean create) throws VersionException, java.io.IOException
- Throws:
VersionExceptionjava.io.IOException
-
-
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 blockstartAddress- the start address of the blocklength- the length of the blockpermissions- the permissions for the blocksplitBlocks- 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 blockstartAddress- the start address of the blocklength- the length of the blockfileBytes- theFileBytesobject that provides the bytes for this blockoffset- the offset into theFileBytesobjectpermissions- the permissions for the block- Returns:
- the new MemoryBlock
- Throws:
java.io.IOException- if a database error occursAddressOverflowException- if block length is too large for the underlying space
-
updateSubBlockRecord
protected void updateSubBlockRecord(DBRecord 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.
-
-