Forward-only cursor combining frame-pointer stepping with exception/trap transitions.
More...
#include <hybrid_unwinder.hpp>
Forward-only cursor combining frame-pointer stepping with exception/trap transitions.
◆ hybrid_stack_unwinder()
Constructs a hybrid unwinder.
- Parameters
-
| fp_unwinder | Frame-pointer unwinder for standard frames. |
| trap_decoder | Trap-frame decoder for transition frames. |
| matcher | Exception trampoline detector. |
| reg_ctx | Target register context. |
| initial_fp | Frame pointer of the starting frame. |
| initial_pc | Program counter of the starting frame. |
◆ for_each_frame()
template<typename Visitor >
| void microfmt::hybrid_stack_unwinder::for_each_frame |
( |
Visitor && |
visitor, |
|
|
uint32_t |
max_depth = 64 |
|
) |
| |
|
inlinenoexcept |
Visitor-style traversal over the hybrid frame chain.
- Template Parameters
-
| Visitor | Callable accepting const hybrid_frame & and returning bool (true = continue). |
- Parameters
-
| visitor | Visitor invoked per frame. |
| max_depth | Maximum number of frames to visit. |
◆ has_value()
| constexpr bool microfmt::hybrid_stack_unwinder::has_value |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Reports whether the cursor is positioned on a frame.
- Returns
true while the current frame is valid.
◆ next()
| bool microfmt::hybrid_stack_unwinder::next |
( |
| ) |
|
|
inlinenoexcept |
Advances to the next frame.
Synthesizes a trap-transition frame when the current (fp, pc) matches an exception trampoline; otherwise performs a standard frame-pointer step.
- Returns
false when the walk can advance no further.
◆ operator bool()
| constexpr microfmt::hybrid_stack_unwinder::operator bool |
( |
| ) |
const |
|
inlineexplicitconstexprnoexcept |
Reports whether the cursor is positioned on a frame.
- Returns
true while the current frame is valid.
◆ operator*()
| constexpr const hybrid_frame & microfmt::hybrid_stack_unwinder::operator* |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the current frame record.
- Returns
- Reference to the current hybrid_frame.
◆ operator++()
Pre-increment advancing to the next frame.
- Returns
- This unwinder.
◆ operator->()
| constexpr const hybrid_frame * microfmt::hybrid_stack_unwinder::operator-> |
( |
| ) |
const |
|
inlineconstexprnoexcept |
Returns the current frame record.
- Returns
- Pointer to the current hybrid_frame.
The documentation for this class was generated from the following file: