Class ProgramByteSource
java.lang.Object
ghidra.features.base.memsearch.bytesource.ProgramByteSource
- All Implemented Interfaces:
AddressableByteSource
AddressableByteSource implementation for a Ghidra Program-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintRetrieves the byte values for an address range.getCanonicalLocation(Address address) Convert byte source address to the canonical (static) locationReturns a list of memory regions where each region has an associated address set of valid addresses that can be read.voidInvalidates any caching of byte values.rebaseFromCanonical(ProgramLocation location) Rebase a canonical location in the current byte source
-
Constructor Details
-
ProgramByteSource
-
-
Method Details
-
getBytes
Description copied from interface:AddressableByteSourceRetrieves the byte values for an address range.- Specified by:
getBytesin interfaceAddressableByteSource- Parameters:
address- The address of the first byte in the rangebytes- the byte array to store the retrieved byte valueslength- the number of bytes to retrieve- Returns:
- the number of bytes actually retrieved
-
getSearchableRegions
Description copied from interface:AddressableByteSourceReturns a list of memory regions where each region has an associated address set of valid addresses that can be read.- Specified by:
getSearchableRegionsin interfaceAddressableByteSource- Returns:
- a list of readable regions
-
invalidate
public void invalidate()Description copied from interface:AddressableByteSourceInvalidates any caching of byte values. This intended to provide a hint in debugging scenario that we are about to issue a sequence of byte value requests where we are re-acquiring previous requested byte values to look for changes.- Specified by:
invalidatein interfaceAddressableByteSource
-
getCanonicalLocation
Description copied from interface:AddressableByteSourceConvert byte source address to the canonical (static) location- Specified by:
getCanonicalLocationin interfaceAddressableByteSource- Parameters:
address- address to be converted- Returns:
- canonical location
-
rebaseFromCanonical
Description copied from interface:AddressableByteSourceRebase a canonical location in the current byte source- Specified by:
rebaseFromCanonicalin interfaceAddressableByteSource- Parameters:
location- location to be rebased- Returns:
- address for new byte source
-
getProgram
-