Package ghidra.program.database.mem
Class MemoryMapDBAdapterV3
java.lang.Object
ghidra.program.database.mem.MemoryMapDBAdapterV3
MemoryMap adapter for version 3.
This version introduces the concept of sub memory blocks and FileBytes
-
Constructor Summary
ConstructorDescriptionMemoryMapDBAdapterV3
(DBHandle handle, MemoryMapDB memMap, long maxSubBlockSize, boolean create) -
Method Summary
Modifier and TypeMethodDescriptionprotected MemoryBlockDB
createBlock
(String name, Address startAddress, long length, int flags, List<ghidra.program.database.mem.SubMemoryBlock> splitBlocks) Creates a new memory block.protected MemoryBlockDB
createFileBytesBlock
(String name, Address startAddress, long length, FileBytes fileBytes, long offset, int flags) Creates a new memory block using a FileBytesprotected void
updateSubBlockRecord
(DBRecord record) Updates the sub memory block record.
-
Constructor Details
-
MemoryMapDBAdapterV3
public MemoryMapDBAdapterV3(DBHandle handle, MemoryMapDB memMap, long maxSubBlockSize, boolean create) throws VersionException, IOException - Throws:
VersionException
IOException
-
-
Method Details
-
createBlock
protected MemoryBlockDB createBlock(String name, Address startAddress, long length, int flags, List<ghidra.program.database.mem.SubMemoryBlock> splitBlocks) throws IOException Creates a new memory block.- Parameters:
name
- the name of the blockstartAddress
- the start address of the blocklength
- the length of the blockflags
- the flags for the blocksplitBlocks
- the list of subBlock objects that make up this block- Returns:
- the new MemoryBlock
- Throws:
IOException
- if a database error occurs
-
createFileBytesBlock
protected MemoryBlockDB createFileBytesBlock(String name, Address startAddress, long length, FileBytes fileBytes, long offset, int flags) throws 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
- theFileBytes
object that provides the bytes for this blockoffset
- the offset into theFileBytes
objectflags
- the flags for the block- Returns:
- the new MemoryBlock
- Throws:
IOException
- if a database error occursAddressOverflowException
- if block length is too large for the underlying space
-
updateSubBlockRecord
Updates the sub memory block record.- Parameters:
record
- the record to update.- Throws:
IOException
- if a database IO error occurs.
-