pub struct DyldCache<'data, E = Endianness, R = &'data [u8]>{ /* private fields */ }
Expand description
A parsed representation of the dyld shared cache.
Implementations§
Source§impl<'data, E, R> DyldCache<'data, E, R>
impl<'data, E, R> DyldCache<'data, E, R>
Sourcepub fn subcache_suffixes(data: R) -> Result<Vec<String>>
pub fn subcache_suffixes(data: R) -> Result<Vec<String>>
Return the suffixes of the subcache files given the data of the main cache file.
Each of these should be appended to the path of the main cache file.
Sourcepub fn parse(data: R, subcache_data: &[R]) -> Result<Self>
pub fn parse(data: R, subcache_data: &[R]) -> Result<Self>
Parse the raw dyld shared cache data.
For shared caches from macOS 12 / iOS 15 and above, the subcache files need to be
supplied as well, in the correct order. Use Self::subcache_suffixes
to obtain
the suffixes for the path of the files.
Sourcepub fn architecture(&self) -> Architecture
pub fn architecture(&self) -> Architecture
Get the architecture type of the file.
Sourcepub fn endianness(&self) -> Endianness
pub fn endianness(&self) -> Endianness
Get the endianness of the file.
Sourcepub fn is_little_endian(&self) -> bool
pub fn is_little_endian(&self) -> bool
Return true if the file is little endian, false if it is big endian.
Sourcepub fn images<'cache>(
&'cache self,
) -> DyldCacheImageIterator<'data, 'cache, E, R> ⓘ
pub fn images<'cache>( &'cache self, ) -> DyldCacheImageIterator<'data, 'cache, E, R> ⓘ
Iterate over the images in this cache.
Sourcepub fn mappings<'cache>(
&'cache self,
) -> impl Iterator<Item = DyldCacheMapping<'data, E, R>> + 'cache
pub fn mappings<'cache>( &'cache self, ) -> impl Iterator<Item = DyldCacheMapping<'data, E, R>> + 'cache
Return all the mappings in this cache.
Sourcepub fn data_and_offset_for_address(&self, address: u64) -> Option<(R, u64)>
pub fn data_and_offset_for_address(&self, address: u64) -> Option<(R, u64)>
Find the address in a mapping and return the cache or subcache data it was found in, together with the translated file offset.