microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
microfmt::exidx_table_searcher Class Reference

Binary search over sorted .ARM.exidx unwind tables. More...

#include <arm_exidx_search.hpp>

Static Public Member Functions

static constexpr uintptr_t decode_prel31 (uintptr_t entry_addr, uint32_t prel31) noexcept
 Decodes a 31-bit program-relative (PREL31) offset.
 
static bool find_exidx_entry (address_space_ref space, uintptr_t table_base, size_t num_entries, uintptr_t target_pc, uint32_t &out_unwind_data) noexcept
 Locates the unwind descriptor covering target_pc.
 

Detailed Description

Binary search over sorted .ARM.exidx unwind tables.

Member Function Documentation

◆ decode_prel31()

static constexpr uintptr_t microfmt::exidx_table_searcher::decode_prel31 ( uintptr_t  entry_addr,
uint32_t  prel31 
)
inlinestaticconstexprnoexcept

Decodes a 31-bit program-relative (PREL31) offset.

Parameters
entry_addrAddress of the PREL31 word itself (base).
prel31Raw PREL31 encoding.
Returns
Absolute address computed from the entry location.

◆ find_exidx_entry()

static bool microfmt::exidx_table_searcher::find_exidx_entry ( address_space_ref  space,
uintptr_t  table_base,
size_t  num_entries,
uintptr_t  target_pc,
uint32_t &  out_unwind_data 
)
inlinestaticnoexcept

Locates the unwind descriptor covering target_pc.

Performs a zero-allocation binary search over the sorted .ARM.exidx table, matching the highest function start not greater than target_pc.

Parameters
spaceAddress space to read from.
table_baseBase address of the .ARM.exidx table.
num_entriesNumber of 8-byte table entries.
target_pcPC being looked up.
out_unwind_dataReceives the descriptor (inline bytecode or .ARM.extab pointer).
Returns
true when a non-EXIDX_CANTUNWIND entry matched.

The documentation for this class was generated from the following file: