pub struct DyldCache<'data, E = Endianness, R = &'data [u8]>where
E: Endian,
R: ReadRef<'data>,{ /* private fields */ }
Expand description
A parsed representation of the dyld shared cache.
Implementations§
source§impl<'data, E, R> DyldCache<'data, E, R>where
E: Endian,
R: ReadRef<'data>,
impl<'data, E, R> DyldCache<'data, E, R>where E: Endian, R: ReadRef<'data>,
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, with the .symbols subcache last (if present). For example, data would be the data for dyld_shared_cache_x86_64, and subcache_data would be the data for [dyld_shared_cache_x86_64.1, dyld_shared_cache_x86_64.2, …]
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 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.
Trait Implementations§
Auto Trait Implementations§
impl<'data, E, R> RefUnwindSafe for DyldCache<'data, E, R>where E: RefUnwindSafe, R: RefUnwindSafe,
impl<'data, E, R> Send for DyldCache<'data, E, R>where E: Send + Sync, R: Send,
impl<'data, E, R> Sync for DyldCache<'data, E, R>where E: Sync, R: Sync,
impl<'data, E, R> Unpin for DyldCache<'data, E, R>where E: Unpin, R: Unpin,
impl<'data, E, R> UnwindSafe for DyldCache<'data, E, R>where E: UnwindSafe + RefUnwindSafe, R: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more