Struct pdb_addr2line::Context[][src]

pub struct Context<'a: 't, 's, 't> { /* fields omitted */ }
Expand description

The main API of this crate. Resolves addresses to function information.

Implementations

impl<'a, 's, 't> Context<'a, 's, 't>[src]

pub fn new_from_parts(
    address_map: &'a AddressMap<'s>,
    string_table: Option<&'a StringTable<'s>>,
    modules: &'a [ModuleInfo<'s>],
    type_formatter: MaybeOwned<'a, TypeFormatter<'t>>
) -> Result<Self>
[src]

Create a Context manually. Most consumers will want to use ContextPdbData::make_context instead.

However, if you interact with a PDB directly and parse some of its contents for other uses, you may want to call this method in order to avoid overhead from repeatedly parsing the same streams.

pub fn procedure_count(&self) -> usize[src]

The number of procedures found in the modules. If the PDB file lists multiple procedures sharing the same rva range, the shared range is only counted as one procedure. In other words, this count is post-deduplication.

pub fn iter_procedures(&self) -> ProcedureIter<'_, 'a, 's, 't>

Notable traits for ProcedureIter<'c, 'a, 's, 't>

impl<'c, 'a, 's, 't> Iterator for ProcedureIter<'c, 'a, 's, 't> type Item = Procedure;
[src]

Iterate over all procedures in the modules.

pub fn find_procedure(&self, probe: u32) -> Result<Option<Procedure>>[src]

Find the procedure (function or method) whose code contains the provided address. The return value only contains the function name and the rva range, but no file or line information.

pub fn find_frames(&self, probe: u32) -> Result<Option<ProcedureFrames<'_>>>[src]

Find information about the source code which generated the instruction at the provided address. This information includes the function name, file name and line number, of the containing procedure and of any functions that were inlined into the procedure by the compiler, at that address.

A lot of information is cached so that repeated calls are fast.

Auto Trait Implementations

impl<'a, 's, 't> !RefUnwindSafe for Context<'a, 's, 't>

impl<'a, 's, 't> !Send for Context<'a, 's, 't>

impl<'a, 's, 't> !Sync for Context<'a, 's, 't>

impl<'a, 's, 't> Unpin for Context<'a, 's, 't> where
    's: 'a,
    't: 'a, 

impl<'a, 's, 't> !UnwindSafe for Context<'a, 's, 't>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.