Zero-allocation, type-erased handle for inspecting and modifying CPU registers from a frame context.
More...
#include <register_context.hpp>
|
| constexpr | register_context_ref () noexcept=default |
| |
| template<typename Tag , typename State , typename Traits = register_context_traits<Tag>, std::enable_if_t< std::is_convertible_v< State *, typename Traits::context_type * >, int > = 0> |
| constexpr | register_context_ref (Tag, State &state RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS, address_space_ref space, span< std::byte > scratch RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS) noexcept |
| |
| template<typename Tag , typename State , typename Traits = register_context_traits<Tag>, std::enable_if_t< std::is_convertible_v< const State *, const typename Traits::context_type * >, int > = 0> |
| constexpr | register_context_ref (Tag, const State &state RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS, address_space_ref space, span< std::byte > scratch RELOCO_LIFETIMEBOUND RELOCO_LIFETIME_CAPTURE_BY_THIS) noexcept |
| |
| template<typename Tag , typename State , std::enable_if_t<!std::is_lvalue_reference_v< State >, int > = 0> |
| constexpr | register_context_ref (Tag, State &&, address_space_ref, span< std::byte >)=delete |
| |
| constexpr bool | is_null () const noexcept |
| |
| constexpr | operator bool () const noexcept |
| |
| template<typename T > |
| bool | read (uint32_t dwarf_reg_index, T &out_value) const noexcept |
| | Reads a register directly into a typed integer or float variable.
|
| |
| bool | read_raw (uint32_t dwarf_reg_index, void *dest, size_t size) const noexcept |
| | Reads raw register bytes into a buffer.
|
| |
| template<typename T > |
| bool | write (uint32_t dwarf_reg_index, const T &value) const noexcept |
| | Writes a typed value into a register by its DWARF index.
|
| |
| bool | write_raw (uint32_t dwarf_reg_index, const void *src, size_t size) const noexcept |
| | Writes raw bytes from a source buffer into a register.
|
| |
| constexpr address_space_ref | space () const noexcept |
| |
| constexpr span< std::byte > | scratch () const noexcept RELOCO_LIFETIMEBOUND |
| |
Zero-allocation, type-erased handle for inspecting and modifying CPU registers from a frame context.
◆ register_context_ref() [1/4]
| constexpr microfmt::register_context_ref::register_context_ref |
( |
| ) |
|
|
constexprdefaultnoexcept |
◆ register_context_ref() [2/4]
template<typename Tag , typename State , typename Traits = register_context_traits<Tag>, std::enable_if_t< std::is_convertible_v< State *, typename Traits::context_type * >, int > = 0>
| constexpr microfmt::register_context_ref::register_context_ref |
( |
Tag |
, |
|
|
State &state RELOCO_LIFETIMEBOUND |
RELOCO_LIFETIME_CAPTURE_BY_THIS, |
|
|
address_space_ref |
space, |
|
|
span< std::byte > scratch RELOCO_LIFETIMEBOUND |
RELOCO_LIFETIME_CAPTURE_BY_THIS |
|
) |
| |
|
inlineconstexprnoexcept |
◆ register_context_ref() [3/4]
template<typename Tag , typename State , typename Traits = register_context_traits<Tag>, std::enable_if_t< std::is_convertible_v< const State *, const typename Traits::context_type * >, int > = 0>
| constexpr microfmt::register_context_ref::register_context_ref |
( |
Tag |
, |
|
|
const State &state RELOCO_LIFETIMEBOUND |
RELOCO_LIFETIME_CAPTURE_BY_THIS, |
|
|
address_space_ref |
space, |
|
|
span< std::byte > scratch RELOCO_LIFETIMEBOUND |
RELOCO_LIFETIME_CAPTURE_BY_THIS |
|
) |
| |
|
inlineconstexprnoexcept |
◆ register_context_ref() [4/4]
template<typename Tag , typename State , std::enable_if_t<!std::is_lvalue_reference_v< State >, int > = 0>
| constexpr microfmt::register_context_ref::register_context_ref |
( |
Tag |
, |
|
|
State && |
, |
|
|
address_space_ref |
, |
|
|
span< std::byte > |
|
|
) |
| |
|
constexprdelete |
◆ is_null()
| constexpr bool microfmt::register_context_ref::is_null |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ operator bool()
| constexpr microfmt::register_context_ref::operator bool |
( |
| ) |
const |
|
inlineexplicitconstexprnoexcept |
◆ read()
template<typename T >
| bool microfmt::register_context_ref::read |
( |
uint32_t |
dwarf_reg_index, |
|
|
T & |
out_value |
|
) |
| const |
|
inlinenoexcept |
Reads a register directly into a typed integer or float variable.
◆ read_raw()
| bool microfmt::register_context_ref::read_raw |
( |
uint32_t |
dwarf_reg_index, |
|
|
void * |
dest, |
|
|
size_t |
size |
|
) |
| const |
|
inlinenoexcept |
Reads raw register bytes into a buffer.
◆ scratch()
| constexpr span< std::byte > microfmt::register_context_ref::scratch |
( |
| ) |
const |
|
inlineconstexprnoexcept |
◆ space()
◆ write()
template<typename T >
| bool microfmt::register_context_ref::write |
( |
uint32_t |
dwarf_reg_index, |
|
|
const T & |
value |
|
) |
| const |
|
inlinenoexcept |
Writes a typed value into a register by its DWARF index.
◆ write_raw()
| bool microfmt::register_context_ref::write_raw |
( |
uint32_t |
dwarf_reg_index, |
|
|
const void * |
src, |
|
|
size_t |
size |
|
) |
| const |
|
inlinenoexcept |
Writes raw bytes from a source buffer into a register.
The documentation for this class was generated from the following file: