Type-erased, two-word handle to an ELF image enumerator.
More...
#include <elf_enumerator.hpp>
|
| struct | vtable |
| | Virtual table of image enumeration operations. More...
|
| |
|
| constexpr | elf_image_enumerator_ref () noexcept=default |
| | Constructs an empty (invalid) handle.
|
| |
| template<typename Tag , typename Context , typename Traits = elf_image_enumerator_traits<Tag>, std::enable_if_t< std::is_convertible_v< const Context *, const typename Traits::context_type * >, int > = 0> |
| constexpr | elf_image_enumerator_ref (Tag, const Context &ctx RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS) noexcept |
| | Constructs a handle from a tag and its traits context.
|
| |
| template<typename Tag , typename Context , std::enable_if_t<!std::is_lvalue_reference_v< Context >, int > = 0> |
| constexpr | elf_image_enumerator_ref (Tag, Context &&)=delete |
| |
| bool | enumerate (span< elf_image_info > out_buffer, size_t &out_count) const noexcept |
| | Fills a caller-provided buffer with registered ELF images.
|
| |
| bool | find_by_pc (uintptr_t pc, elf_image_info &out_info) const noexcept |
| | Locates the ELF image containing the given PC address.
|
| |
| constexpr | operator bool () const noexcept |
| | Reports whether the handle is bound to an enumerator.
|
| |
|
| template<typename Tag , typename Context , typename Traits = elf_image_enumerator_traits<Tag>> |
| static constexpr elf_image_enumerator_ref | make (const Context &ctx RELOCO_LIFETIMEBOUND) noexcept |
| |
| template<typename Tag , typename Context , std::enable_if_t<!std::is_lvalue_reference_v< Context >, int > = 0> |
| static elf_image_enumerator_ref | make (Context &&)=delete |
| |
Type-erased, two-word handle to an ELF image enumerator.
Binds a traits-selected provider context with zero allocation.
◆ elf_image_enumerator_ref() [1/3]
| constexpr microfmt::elf_image_enumerator_ref::elf_image_enumerator_ref |
( |
| ) |
|
|
constexprdefaultnoexcept |
Constructs an empty (invalid) handle.
◆ elf_image_enumerator_ref() [2/3]
template<typename Tag , typename Context , typename Traits = elf_image_enumerator_traits<Tag>, std::enable_if_t< std::is_convertible_v< const Context *, const typename Traits::context_type * >, int > = 0>
| constexpr microfmt::elf_image_enumerator_ref::elf_image_enumerator_ref |
( |
Tag |
, |
|
|
const Context &ctx RELOCO_LIFETIMEBOUND |
RELOCO_LIFETIME_CAPTURE_BY_THIS |
|
) |
| |
|
inlineconstexprnoexcept |
Constructs a handle from a tag and its traits context.
- Template Parameters
-
| Tag | Implementation tag type. |
| Context | Concrete context type exposing enumerate and find_by_pc. |
- Parameters
-
| ctx | Context object performing the enumeration. |
◆ elf_image_enumerator_ref() [3/3]
template<typename Tag , typename Context , std::enable_if_t<!std::is_lvalue_reference_v< Context >, int > = 0>
| constexpr microfmt::elf_image_enumerator_ref::elf_image_enumerator_ref |
( |
Tag |
, |
|
|
Context && |
|
|
) |
| |
|
constexprdelete |
◆ enumerate()
| bool microfmt::elf_image_enumerator_ref::enumerate |
( |
span< elf_image_info > |
out_buffer, |
|
|
size_t & |
out_count |
|
) |
| const |
|
inlinenoexcept |
Fills a caller-provided buffer with registered ELF images.
- Parameters
-
| out_buffer | Destination buffer for image records. |
| out_count | Receives the number of images stored. |
- Returns
true on success, false if the handle is empty.
◆ find_by_pc()
| bool microfmt::elf_image_enumerator_ref::find_by_pc |
( |
uintptr_t |
pc, |
|
|
elf_image_info & |
out_info |
|
) |
| const |
|
inlinenoexcept |
Locates the ELF image containing the given PC address.
- Parameters
-
| pc | Code address to look up. |
| out_info | Receives the owning image record. |
- Returns
true when an owning image was found.
◆ make() [1/2]
template<typename Tag , typename Context , typename Traits = elf_image_enumerator_traits<Tag>>
| static constexpr elf_image_enumerator_ref microfmt::elf_image_enumerator_ref::make |
( |
const Context &ctx |
RELOCO_LIFETIMEBOUND | ) |
|
|
inlinestaticconstexprnoexcept |
◆ make() [2/2]
template<typename Tag , typename Context , std::enable_if_t<!std::is_lvalue_reference_v< Context >, int > = 0>
◆ operator bool()
| constexpr microfmt::elf_image_enumerator_ref::operator bool |
( |
| ) |
const |
|
inlineexplicitconstexprnoexcept |
Reports whether the handle is bound to an enumerator.
- Returns
true when the handle is valid.
The documentation for this class was generated from the following file: