Crate blazesym

Source
Expand description

blazesym is a library that can be used to symbolize addresses. Address symbolization is a common problem in tracing contexts, for example, where users want to reason about functions by name, but low level components report only the “raw” addresses (e.g., in the form of stacktraces).

In addition to symbolization, blazesym also provides APIs for the reverse operation: looking up addresses from symbol names. That can be useful, for example, for configuring breakpoints or tracepoints.

§Overview

The crate is organized via public modules that expose functionality pertaining a certain topic. Specifically, these areas are currently covered:

  • symbolize covers address symbolization functionality
  • inspect contains APIs for inspecting files such as ELF and Gsym to lookup addresses to symbol names, for example
  • normalize exposes address normalization functionality

C API bindings are defined in a cross-cutting manner as part of the blazesym-c crate (note that Rust code should not have to consume these functions and at the ABI level this module organization has no relevance for C).

§Observability

blazesym optionally integrates with the tracing crate and infrastructure and emits spans/events as part of common operations (if the tracing feature is enabled). Please refer to the tracing documentation for guidance on how to configure event subscription.

Modules§

helper
Utility functionality not specific to any overarching theme.
inspect
Functionality for inspecting files such as ELF or Gsym. Supported operations are looking up symbol information (address, size, type, etc.) by name or iterating over all available symbols.
normalize
Functionality for address normalization.
symbolize
Functionality for symbolizing addresses.

Structs§

Error
The error type used by the library.
Mmap
A type encapsulating a region of mapped memory.

Enums§

ErrorKind
An enum providing a rough classification of errors.
MaybeDefault
A type representing an optional value or a default.
Pid
An enumeration identifying a process.
SymType
The type of a symbol.

Traits§

ErrorExt
A trait providing ergonomic chaining capabilities to Error.
IntoError
A trait providing conversion shortcuts for creating Error instances.

Type Aliases§

Addr
A type representing addresses.
BuildId
A GNU build ID, as raw bytes.
Result
A result type using our Error by default.