SymbolManager

Struct SymbolManager 

Source
pub struct SymbolManager<H: FileAndPathHelper> { /* private fields */ }

Implementations§

Source§

impl<H, F, FL> SymbolManager<H>
where H: FileAndPathHelper<F = F, FL = FL>, F: FileContents + 'static, FL: FileLocation,

Source

pub fn with_helper(helper: H) -> Self

Source

pub fn helper(&self) -> Arc<H>

Exposes the helper.

Source

pub async fn load_source_file( &self, debug_file_location: &H::FL, source_file_path: &SourceFilePath, ) -> Result<String, Error>

Source

pub async fn load_symbol_map( &self, library_info: &LibraryInfo, ) -> Result<SymbolMap<H>, Error>

Obtain a symbol map for the library, given the (partial) LibraryInfo. At least the debug_id has to be given.

Source

pub async fn load_external_file( &self, debug_file_location: &H::FL, external_file_path: &str, ) -> Result<ExternalFileSymbolMap<H::F>, Error>

Load and return an external file which may contain additional debug info.

This is used on macOS: When linking multiple .o files together into a library or an executable, the linker does not copy the dwarf sections into the linked output. Instead, it stores the paths to those original .o files, using OSO stabs entries.

A SymbolMap for such a linked file will not find debug info, and will return FramesLookupResult::External from the lookups. Then the address needs to be looked up in the external file.

Also see SymbolMap::lookup_external.

Source

pub async fn load_binary( &self, info: &LibraryInfo, ) -> Result<BinaryImage<F>, Error>

Returns the binary for the given (partial) LibraryInfo.

This consults the helper to get candidate paths to the binary.

Source

pub async fn load_binary_for_dyld_cache_image( &self, dylib_path: &str, multi_arch_disambiguator: Option<MultiArchDisambiguator>, ) -> Result<BinaryImage<F>, Error>

Source

pub async fn load_symbol_map_for_dyld_cache_image( &self, dylib_path: &str, multi_arch_disambiguator: Option<MultiArchDisambiguator>, ) -> Result<SymbolMap<H>, Error>

Source

pub async fn load_symbol_map_from_location( &self, file_location: FL, multi_arch_disambiguator: Option<MultiArchDisambiguator>, ) -> Result<SymbolMap<H>, Error>

Source

pub async fn load_binary_at_location( &self, file_location: H::FL, name: Option<String>, path: Option<String>, multi_arch_disambiguator: Option<MultiArchDisambiguator>, ) -> Result<BinaryImage<F>, Error>

Auto Trait Implementations§

§

impl<H> Freeze for SymbolManager<H>

§

impl<H> RefUnwindSafe for SymbolManager<H>
where H: RefUnwindSafe,

§

impl<H> Send for SymbolManager<H>
where H: Sync + Send,

§

impl<H> Sync for SymbolManager<H>
where H: Sync + Send,

§

impl<H> Unpin for SymbolManager<H>

§

impl<H> UnwindSafe for SymbolManager<H>
where H: RefUnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

impl<T> ErasedDestructor for T
where T: 'static,