Struct goblin::pe::exception::ExceptionData
source · pub struct ExceptionData<'a> { /* private fields */ }
Expand description
Exception handling and stack unwind information for functions in the image.
Implementations§
source§impl<'a> ExceptionData<'a>
impl<'a> ExceptionData<'a>
sourcepub fn parse(
bytes: &'a [u8],
directory: DataDirectory,
sections: &[SectionTable],
file_alignment: u32
) -> Result<Self>
pub fn parse( bytes: &'a [u8], directory: DataDirectory, sections: &[SectionTable], file_alignment: u32 ) -> Result<Self>
Parses exception data from the image at the given offset.
sourcepub fn parse_with_opts(
bytes: &'a [u8],
directory: DataDirectory,
sections: &[SectionTable],
file_alignment: u32,
opts: &ParseOptions
) -> Result<Self>
pub fn parse_with_opts( bytes: &'a [u8], directory: DataDirectory, sections: &[SectionTable], file_alignment: u32, opts: &ParseOptions ) -> Result<Self>
Parses exception data from the image at the given offset.
sourcepub fn functions(&self) -> RuntimeFunctionIterator<'a> ⓘ
pub fn functions(&self) -> RuntimeFunctionIterator<'a> ⓘ
Iterates all function entries in order of their code offset.
To search for a function by relative instruction address, use find_function
. To resolve
unwind information, use get_unwind_info
.
sourcepub fn get_function(&self, index: usize) -> Result<RuntimeFunction>
pub fn get_function(&self, index: usize) -> Result<RuntimeFunction>
Returns the function at the given index.
sourcepub fn find_function(&self, rva: u32) -> Result<Option<RuntimeFunction>>
pub fn find_function(&self, rva: u32) -> Result<Option<RuntimeFunction>>
Performs a binary search to find a function entry covering the given RVA relative to the image.
sourcepub fn get_unwind_info(
&self,
function: RuntimeFunction,
sections: &[SectionTable]
) -> Result<UnwindInfo<'a>>
pub fn get_unwind_info( &self, function: RuntimeFunction, sections: &[SectionTable] ) -> Result<UnwindInfo<'a>>
Resolves unwind information for the given function entry.
sourcepub fn get_unwind_info_with_opts(
&self,
function: RuntimeFunction,
sections: &[SectionTable],
opts: &ParseOptions
) -> Result<UnwindInfo<'a>>
pub fn get_unwind_info_with_opts( &self, function: RuntimeFunction, sections: &[SectionTable], opts: &ParseOptions ) -> Result<UnwindInfo<'a>>
Resolves unwind information for the given function entry.
Trait Implementations§
source§impl Debug for ExceptionData<'_>
impl Debug for ExceptionData<'_>
source§impl<'a> IntoIterator for &ExceptionData<'a>
impl<'a> IntoIterator for &ExceptionData<'a>
Auto Trait Implementations§
impl<'a> RefUnwindSafe for ExceptionData<'a>
impl<'a> Send for ExceptionData<'a>
impl<'a> Sync for ExceptionData<'a>
impl<'a> Unpin for ExceptionData<'a>
impl<'a> UnwindSafe for ExceptionData<'a>
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