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
impl Symbolizer
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new Symbolizer
.
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Retrieve a Builder
object for configurable construction of a
Symbolizer
.
sourcepub fn symbolize<'slf>(
&'slf self,
src: &Source<'_>,
input: Input<&[u64]>
) -> Result<Vec<Symbolized<'slf>>>
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.
Format | Feature | Supported by format? | Supported by blazesym? |
---|---|---|---|
Breakpad | symbol size | yes | yes |
source code location information | yes | yes | |
inlined function information | yes | yes | |
ELF | symbol size | yes | yes |
source code location information | no | N/A | |
inlined function information | no | N/A | |
DWARF | symbol size | yes | yes |
source code location information | yes | yes | |
inlined function information | yes | yes | |
Gsym | symbol size | yes | yes |
source code location information | yes | yes | |
inlined function information | yes | yes | |
Ksym | symbol size | no | N/A |
source code location information | no | N/A | |
inlined function information | no | N/A |
sourcepub fn symbolize_single<'slf>(
&'slf self,
src: &Source<'_>,
input: Input<u64>
) -> Result<Symbolized<'slf>>
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.