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

Encodes register values from a execution context into GDB RSP hex strings. More...

#include <gdb_register_array.hpp>

Static Public Member Functions

template<typename AbiTraits >
static void encode_all_registers (sink out, const register_context_ref &ctx) noexcept
 Encodes the full register layout for a specific architecture ('g' packet response).
 
static RELOCO_BEGIN_UNSAFE_CODE void encode_single_register (sink out, const register_context_ref &ctx, const register_mapping &reg) noexcept
 Encodes a single register based on its mapping ('p' packet response).
 

Detailed Description

Encodes register values from a execution context into GDB RSP hex strings.

Generates payloads for 'g' (read all general registers) and 'p' (read single register) requests.

Member Function Documentation

◆ encode_all_registers()

template<typename AbiTraits >
static void microfmt::gdb::register_array_encoder::encode_all_registers ( sink  out,
const register_context_ref &  ctx 
)
inlinestaticnoexcept

Encodes the full register layout for a specific architecture ('g' packet response).

Iterates over the standard GDB layout in sequential order, querying the context using the mapped DWARF indices.

Template Parameters
AbiTraitsThe target ABI traits (e.g., aarch64_abi_traits).
Parameters
outThe sink to stream the hex payload into.
ctxThe typed-erased kernel/debugger thread context.

◆ encode_single_register()

static RELOCO_BEGIN_UNSAFE_CODE void microfmt::gdb::register_array_encoder::encode_single_register ( sink  out,
const register_context_ref &  ctx,
const register_mapping &  reg 
)
inlinestaticnoexcept

Encodes a single register based on its mapping ('p' packet response).

Parameters
outThe sink to stream the hex payload into.
ctxThe typed-erased kernel/debugger thread context.
regThe register mapping describing size and DWARF index.

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