Type-erased, two-word handle to a symbol resolver.
More...
#include <symbol_resolver.hpp>
|
| struct | vtable |
| | Virtual table of symbol-resolution operations. More...
|
| |
|
| constexpr | symbol_resolver_ref () noexcept=default |
| | Constructs an empty (invalid) handle.
|
| |
| template<typename Tag , typename Traits = symbol_resolver_traits<Tag>, std::enable_if_t< std::is_void_v< typename Traits::context_type >, int > = 0> |
| constexpr | symbol_resolver_ref (Tag) noexcept |
| | Constructs a handle for a stateless resolver tag.
|
| |
| template<typename Tag , typename Context , typename Traits = symbol_resolver_traits<Tag>, std::enable_if_t<!std::is_void_v< typename Traits::context_type > &&std::is_convertible_v< const Context *, const typename Traits::context_type * >, int > = 0> |
| constexpr | symbol_resolver_ref (Tag, const Context &ctx RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS) noexcept |
| | Constructs a handle for a stateful resolver tag.
|
| |
| template<typename Tag , typename Context , std::enable_if_t<!std::is_lvalue_reference_v< Context >, int > = 0> |
| constexpr | symbol_resolver_ref (Tag, Context &&)=delete |
| |
| bool | resolve (uintptr_t addr, symbol_resolution_context &context) const noexcept |
| | Resolves an address and computes the derived offsets.
|
| |
| bool | resolve (uintptr_t addr, span< char > scratch, raw_resolved_symbol &raw_storage, resolved_symbol_info &out_info) const noexcept |
| | Resolves an address using caller-owned intermediate storage.
|
| |
| constexpr | operator bool () const noexcept |
| | Reports whether the handle is bound to a resolver.
|
| |
|
| template<typename Tag , typename Traits = symbol_resolver_traits<Tag>, std::enable_if_t< std::is_void_v< typename Traits::context_type >, int > = 0> |
| static constexpr symbol_resolver_ref | make () noexcept |
| | Creates a handle for a stateless resolver tag.
|
| |
| template<typename Tag , typename Context , typename Traits = symbol_resolver_traits<Tag>, std::enable_if_t<!std::is_void_v< typename Traits::context_type >, int > = 0> |
| static constexpr symbol_resolver_ref | make (const Context &ctx RELOCO_LIFETIMEBOUND) noexcept |
| | Creates a handle for a stateful resolver tag.
|
| |
| template<typename Tag , typename Context , std::enable_if_t<!std::is_lvalue_reference_v< Context >, int > = 0> |
| static symbol_resolver_ref | make (Context &&)=delete |
| |
Type-erased, two-word handle to a symbol resolver.
Resolves addresses to symbols and derives the relative offsets stored in resolved_symbol_info.
◆ symbol_resolver_ref() [1/4]
| constexpr microfmt::symbol_resolver_ref::symbol_resolver_ref |
( |
| ) |
|
|
constexprdefaultnoexcept |
Constructs an empty (invalid) handle.
◆ symbol_resolver_ref() [2/4]
template<typename Tag , typename Traits = symbol_resolver_traits<Tag>, std::enable_if_t< std::is_void_v< typename Traits::context_type >, int > = 0>
| constexpr microfmt::symbol_resolver_ref::symbol_resolver_ref |
( |
Tag |
| ) |
|
|
inlineexplicitconstexprnoexcept |
Constructs a handle for a stateless resolver tag.
- Template Parameters
-
| Tag | Resolver tag type. |
| Traits | Specialized traits, enabled when context_type is void. |
◆ symbol_resolver_ref() [3/4]
template<typename Tag , typename Context , typename Traits = symbol_resolver_traits<Tag>, std::enable_if_t<!std::is_void_v< typename Traits::context_type > &&std::is_convertible_v< const Context *, const typename Traits::context_type * >, int > = 0>
| constexpr microfmt::symbol_resolver_ref::symbol_resolver_ref |
( |
Tag |
, |
|
|
const Context &ctx RELOCO_LIFETIMEBOUND |
RELOCO_LIFETIME_CAPTURE_BY_THIS |
|
) |
| |
|
inlineconstexprnoexcept |
Constructs a handle for a stateful resolver tag.
- Template Parameters
-
| Tag | Resolver tag type. |
| Context | Concrete context type. |
| Traits | Specialized traits, enabled when context_type is non-void and Context converts to it. |
- Parameters
-
| ctx | Context object performing the resolution. |
◆ symbol_resolver_ref() [4/4]
template<typename Tag , typename Context , std::enable_if_t<!std::is_lvalue_reference_v< Context >, int > = 0>
| constexpr microfmt::symbol_resolver_ref::symbol_resolver_ref |
( |
Tag |
, |
|
|
Context && |
|
|
) |
| |
|
constexprdelete |
◆ make() [1/3]
template<typename Tag , typename Traits = symbol_resolver_traits<Tag>, std::enable_if_t< std::is_void_v< typename Traits::context_type >, int > = 0>
|
|
inlinestaticconstexprnoexcept |
Creates a handle for a stateless resolver tag.
- Template Parameters
-
| Tag | Resolver tag type. |
| Traits | Specialized traits, enabled when context_type is void. |
- Returns
- An symbol_resolver_ref for the tag.
◆ make() [2/3]
template<typename Tag , typename Context , typename Traits = symbol_resolver_traits<Tag>, std::enable_if_t<!std::is_void_v< typename Traits::context_type >, int > = 0>
| static constexpr symbol_resolver_ref microfmt::symbol_resolver_ref::make |
( |
const Context &ctx |
RELOCO_LIFETIMEBOUND | ) |
|
|
inlinestaticconstexprnoexcept |
Creates a handle for a stateful resolver tag.
- Template Parameters
-
| Tag | Resolver tag type. |
| Context | Concrete context type. |
| Traits | Specialized traits, enabled when context_type is non-void. |
- Parameters
-
| ctx | Context object performing the resolution. |
- Returns
- An symbol_resolver_ref bound to
ctx.
◆ make() [3/3]
template<typename Tag , typename Context , std::enable_if_t<!std::is_lvalue_reference_v< Context >, int > = 0>
◆ operator bool()
| constexpr microfmt::symbol_resolver_ref::operator bool |
( |
| ) |
const |
|
inlineexplicitconstexprnoexcept |
Reports whether the handle is bound to a resolver.
- Returns
true when the handle is valid.
◆ resolve() [1/2]
Resolves an address using caller-owned intermediate storage.
- Parameters
-
| addr | Address to resolve. |
| scratch | Scratch buffer available to the backend. |
| raw_storage | Storage used for the backend's raw result. |
| out_info | Receives the derived symbol info. |
- Returns
true on success, false when the handle is empty or resolution fails.
◆ resolve() [2/2]
Resolves an address and computes the derived offsets.
- Parameters
-
| addr | Address to resolve. |
| scratch | Scratch buffer available to the backend. |
| out_info | Receives the derived symbol info. |
- Returns
true on success, false when the handle is empty or resolution fails.
The documentation for this class was generated from the following file: