Struct blazesym::symbolize::Symbolizer

source ·
pub struct Symbolizer { /* private fields */ }
Expand description

Symbolizer provides an interface to symbolize addresses.

An instance of this type is the unit at which symbolization inputs are cached. That is to say, source files (DWARF, ELF, …) and the parsed data structures may be kept around in memory for the lifetime of this object to speed up future symbolization requests. If you are working with large input sources and/or do not intend to perform multiple symbolization requests (i.e., symbolize or symbolize_single calls) for the same symbolization source, you may want to consider creating a new Symbolizer instance regularly.

§Notes

Please note that demangling results are not cached.

Implementations§

source§

impl Symbolizer

source

pub fn new() -> Self

Create a new Symbolizer.

source

pub fn builder() -> Builder

Retrieve a Builder object for configurable construction of a Symbolizer.

source

pub fn symbolize<'slf>( &'slf self, src: &Source<'_>, input: Input<&[u64]> ) -> Result<Vec<Symbolized<'slf>>>

Symbolize a list of addresses.

Symbolize a list of addresses using the provided symbolization Source.

This function returns exactly one Symbolized object for each input address, in the order of input addresses.

The following table lists which features the various formats (represented by the Source argument) support. If a feature is not supported, the corresponding data in the Sym result will not be populated.

FormatFeatureSupported by format?Supported by blazesym?
Breakpadsymbol sizeyesyes
source code location informationyesyes
inlined function informationyesyes
ELFsymbol sizeyesyes
source code location informationnoN/A
inlined function informationnoN/A
DWARFsymbol sizeyesyes
source code location informationyesyes
inlined function informationyesyes
Gsymsymbol sizeyesyes
source code location informationyesyes
inlined function informationyesyes
Ksymsymbol sizenoN/A
source code location informationnoN/A
inlined function informationnoN/A
source

pub fn symbolize_single<'slf>( &'slf self, src: &Source<'_>, input: Input<u64> ) -> Result<Symbolized<'slf>>

Symbolize a single input address/offset.

In general, it is more performant to symbolize addresses in batches using symbolize. However, in cases where only a single address is available, this method provides a more convenient API.

Trait Implementations§

source§

impl Debug for Symbolizer

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Symbolizer

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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>,

§

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>,

§

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.