pub struct Reader<'parser> { /* private fields */ }Expand description
A reader lets you translate & read virtual memory from a dump file.
Implementations§
Source§impl<'parser> Reader<'parser>
impl<'parser> Reader<'parser>
pub fn new(parser: &'parser KernelDumpParser) -> Self
pub fn with_dtb(parser: &'parser KernelDumpParser, dtb: Gpa) -> Self
Sourcepub fn read_exact(&self, gva: Gva, buf: &mut [u8]) -> Result<()>
pub fn read_exact(&self, gva: Gva, buf: &mut [u8]) -> Result<()>
Read the exact amount of bytes asked by the user & return a
Error::PartialRead error if it couldn’t read as much as wanted.
Sourcepub fn read(&self, gva: Gva, buf: &mut [u8]) -> Result<usize>
pub fn read(&self, gva: Gva, buf: &mut [u8]) -> Result<usize>
Read the virtual memory starting at gva into buf. If it cannot read
as much as asked by the user because the dump file is missing a physical
memory page or because one of the PXE is non present, the function
doesn’t error out and return the amount of bytes that was
successfully read.
Sourcepub fn read_struct<T: Pod>(&self, gva: Gva) -> Result<T>
pub fn read_struct<T: Pod>(&self, gva: Gva) -> Result<T>
Read a T from virtual memory.
Sourcepub fn try_translate(&self, gva: Gva) -> Result<Option<Translation>>
pub fn try_translate(&self, gva: Gva) -> Result<Option<Translation>>
Try to translate gva into Gpa.
Auto Trait Implementations§
impl<'parser> Freeze for Reader<'parser>
impl<'parser> !RefUnwindSafe for Reader<'parser>
impl<'parser> !Send for Reader<'parser>
impl<'parser> !Sync for Reader<'parser>
impl<'parser> Unpin for Reader<'parser>
impl<'parser> !UnwindSafe for Reader<'parser>
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