Type-erased, two-word handle to a frame unwinder.
More...
#include <frame_pointer.hpp>
|
| constexpr | frame_unwinder_ref () noexcept=default |
| | Constructs an empty (invalid) handle.
|
| |
| template<typename ArchTag , typename Traits = frame_unwinder_traits<ArchTag>, std::enable_if_t< std::is_void_v< typename Traits::context_type >, int > = 0> |
| constexpr | frame_unwinder_ref (ArchTag) noexcept |
| | Constructs a handle for a stateless unwinder tag.
|
| |
| template<typename ArchTag , typename Context , typename Traits = frame_unwinder_traits<ArchTag>, 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 | frame_unwinder_ref (ArchTag, const Context &ctx RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS) noexcept |
| | Constructs a handle for a stateful unwinder tag.
|
| |
| template<typename ArchTag , typename Context , std::enable_if_t<!std::is_lvalue_reference_v< Context >, int > = 0> |
| constexpr | frame_unwinder_ref (ArchTag, Context &&)=delete |
| |
| bool | step (register_context_ref reg_ctx, uintptr_t current_pc, uintptr_t &next_fp, uintptr_t &next_pc) const noexcept |
| | Advances from the current frame to its caller using register_context_ref.
|
| |
| constexpr | operator bool () const noexcept |
| |
|
| template<typename ArchTag , typename Traits = frame_unwinder_traits<ArchTag>, std::enable_if_t< std::is_void_v< typename Traits::context_type >, int > = 0> |
| static constexpr frame_unwinder_ref | make () noexcept |
| |
| template<typename ArchTag , typename Context , typename Traits = frame_unwinder_traits<ArchTag>, std::enable_if_t<!std::is_void_v< typename Traits::context_type >, int > = 0> |
| static constexpr frame_unwinder_ref | make (const Context &ctx RELOCO_LIFETIMEBOUND) noexcept |
| |
| template<typename ArchTag , typename Context , std::enable_if_t<!std::is_lvalue_reference_v< Context >, int > = 0> |
| static frame_unwinder_ref | make (Context &&)=delete |
| |
Type-erased, two-word handle to a frame unwinder.
Packs a context pointer and a virtual table into two words, avoiding allocations, RTTI, and virtual dispatch.
◆ frame_unwinder_ref() [1/4]
| constexpr microfmt::frame_unwinder_ref::frame_unwinder_ref |
( |
| ) |
|
|
constexprdefaultnoexcept |
Constructs an empty (invalid) handle.
◆ frame_unwinder_ref() [2/4]
template<typename ArchTag , typename Traits = frame_unwinder_traits<ArchTag>, std::enable_if_t< std::is_void_v< typename Traits::context_type >, int > = 0>
| constexpr microfmt::frame_unwinder_ref::frame_unwinder_ref |
( |
ArchTag |
| ) |
|
|
inlineexplicitconstexprnoexcept |
Constructs a handle for a stateless unwinder tag.
◆ frame_unwinder_ref() [3/4]
template<typename ArchTag , typename Context , typename Traits = frame_unwinder_traits<ArchTag>, 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::frame_unwinder_ref::frame_unwinder_ref |
( |
ArchTag |
, |
|
|
const Context &ctx RELOCO_LIFETIMEBOUND |
RELOCO_LIFETIME_CAPTURE_BY_THIS |
|
) |
| |
|
inlineconstexprnoexcept |
Constructs a handle for a stateful unwinder tag.
◆ frame_unwinder_ref() [4/4]
template<typename ArchTag , typename Context , std::enable_if_t<!std::is_lvalue_reference_v< Context >, int > = 0>
| constexpr microfmt::frame_unwinder_ref::frame_unwinder_ref |
( |
ArchTag |
, |
|
|
Context && |
|
|
) |
| |
|
constexprdelete |
◆ make() [1/3]
template<typename ArchTag , typename Traits = frame_unwinder_traits<ArchTag>, std::enable_if_t< std::is_void_v< typename Traits::context_type >, int > = 0>
|
|
inlinestaticconstexprnoexcept |
◆ make() [2/3]
template<typename ArchTag , typename Context , typename Traits = frame_unwinder_traits<ArchTag>, std::enable_if_t<!std::is_void_v< typename Traits::context_type >, int > = 0>
| static constexpr frame_unwinder_ref microfmt::frame_unwinder_ref::make |
( |
const Context &ctx |
RELOCO_LIFETIMEBOUND | ) |
|
|
inlinestaticconstexprnoexcept |
◆ make() [3/3]
template<typename ArchTag , typename Context , std::enable_if_t<!std::is_lvalue_reference_v< Context >, int > = 0>
◆ operator bool()
| constexpr microfmt::frame_unwinder_ref::operator bool |
( |
| ) |
const |
|
inlineexplicitconstexprnoexcept |
◆ step()
| bool microfmt::frame_unwinder_ref::step |
( |
register_context_ref |
reg_ctx, |
|
|
uintptr_t |
current_pc, |
|
|
uintptr_t & |
next_fp, |
|
|
uintptr_t & |
next_pc |
|
) |
| const |
|
inlinenoexcept |
Advances from the current frame to its caller using register_context_ref.
- Parameters
-
| reg_ctx | Target register context handle. |
| current_pc | Program counter of the frame being unwound from (supplied by the caller/iterator, not read out of reg_ctx); backends use this purely to look up the applicable unwind descriptor (.ARM.exidx entry, DWARF FDE, unwind hint, ...) for the current frame. Register restoration (SP/FP/LR/...) still happens via reg_ctx itself. |
| next_fp | Receives the caller's frame pointer. |
| next_pc | Receives the caller's program counter. |
The documentation for this class was generated from the following file: