Package ghidra.program.model.mem
Interface MemoryBlockSourceInfo
-
public interface MemoryBlockSourceInfo
Describes the source of bytes for a memory block.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
contains(Address address)
Returns true if this SourceInfo object applies to the given address;java.lang.String
getDescription()
Returns a description of this SourceInfo object.java.util.Optional<FileBytes>
getFileBytes()
Returns anOptional
FileBytes
object if a FileBytes object is the byte source for this SourceInfo.long
getFileBytesOffset()
long
getFileBytesOffset(Address address)
long
getLength()
Returns the length of this block byte source.java.util.Optional<AddressRange>
getMappedRange()
Returns anOptional
AddressRange
for the mapped addresses if this is mapped memory block (bit mapped or byte mapped).Address
getMaxAddress()
Returns the end address where this byte source is mapped.MemoryBlock
getMemoryBlock()
Returns the containing Memory BlockAddress
getMinAddress()
Returns the start address where this byte source is mapped.
-
-
-
Method Detail
-
getLength
long getLength()
Returns the length of this block byte source.- Returns:
- the length of this block byte source.
-
getMinAddress
Address getMinAddress()
Returns the start address where this byte source is mapped.- Returns:
- the start address where this byte source is mapped.
-
getMaxAddress
Address getMaxAddress()
Returns the end address where this byte source is mapped.- Returns:
- the end address where this byte source is mapped.
-
getDescription
java.lang.String getDescription()
Returns a description of this SourceInfo object.- Returns:
- a description of this SourceInfo object.
-
getFileBytes
java.util.Optional<FileBytes> getFileBytes()
Returns anOptional
FileBytes
object if a FileBytes object is the byte source for this SourceInfo. Otherwise, the Optional will be empty.- Returns:
- the
FileBytes
object if it is the byte source for this section
-
getFileBytesOffset
long getFileBytesOffset()
Returns the offset into theFileBytes
object where this section starts getting its bytes or -1 if this SourceInfo does not have an associatedFileBytes
- Returns:
- the offset into the
FileBytes
object where this section starts getting its bytes.
-
getFileBytesOffset
long getFileBytesOffset(Address address)
-
getMappedRange
java.util.Optional<AddressRange> getMappedRange()
Returns anOptional
AddressRange
for the mapped addresses if this is mapped memory block (bit mapped or byte mapped). Otherwise, the Optional is empty.- Returns:
- an
Optional
AddressRange
for the mapped addresses if this is mapped memory block
-
getMemoryBlock
MemoryBlock getMemoryBlock()
Returns the containing Memory Block- Returns:
- the containing Memory Block
-
contains
boolean contains(Address address)
Returns true if this SourceInfo object applies to the given address;- Parameters:
address
- the address to test if this is its SourceInfo- Returns:
- true if this SourceInfo object applies to the given address;
-
-