|
microfmt
Zero-allocation C++ formatting for constrained environments
|
POSIX ucontext_t / mcontext_t register context adapter for Linux and FreeBSD. More...
#include <cstdint>#include <cstring>#include <type_traits>#include <ucontext.h>#include "../microfmt.hpp"#include "dwarf_registers.hpp"#include "register_context.hpp"
Go to the source code of this file.
Namespaces | |
| namespace | microfmt |
| namespace | microfmt::detail |
Functions | |
| bool | microfmt::detail::ucontext_read_register (const void *ctx, address_space_ref, uint32_t dwarf_reg_index, void *out_value, size_t value_size) noexcept |
Reads a general-purpose register out of a POSIX ucontext_t by its DWARF register index (see microfmt::dwarf). | |
| bool | microfmt::detail::ucontext_write_register (void *ctx, address_space_ref, uint32_t dwarf_reg_index, const void *in_value, size_t value_size) noexcept |
Writes a general-purpose register into a POSIX ucontext_t by its DWARF register index (see microfmt::dwarf). | |
| register_context_ref | microfmt::make_ucontext_register_context_ref (const ucontext_t &uctx RELOCO_LIFETIMEBOUND, address_space_ref space, span< std::byte > scratch RELOCO_LIFETIMEBOUND) noexcept |
Creates a read-only, type-erased register_context_ref backed by a POSIX ucontext_t (e.g. a signal handler's third argument). | |
| register_context_ref | microfmt::make_mutable_ucontext_register_context_ref (ucontext_t &uctx RELOCO_LIFETIMEBOUND, address_space_ref space, span< std::byte > scratch RELOCO_LIFETIMEBOUND) noexcept |
Creates a mutable, type-erased register_context_ref backed by a POSIX ucontext_t, supporting both register reads and writes. | |
POSIX ucontext_t / mcontext_t register context adapter for Linux and FreeBSD.