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

Decodes GDB RSP hex strings into binary values and writes them to the execution context. More...

#include <gdb_register_array.hpp>

Static Public Member Functions

template<typename AbiTraits >
static bool decode_all_registers (string_view hex_payload, const register_context_ref &ctx) noexcept
 Decodes the full register layout hex payload ('G' packet payload).
 
static RELOCO_BEGIN_UNSAFE_CODE bool decode_single_register (string_view hex_payload, const register_context_ref &ctx, const register_mapping &reg) noexcept
 Decodes a single register hex payload ('P' packet value).
 

Detailed Description

Decodes GDB RSP hex strings into binary values and writes them to the execution context.

Processes payloads for 'G' (write all general registers) and 'P' (write single register) requests.

Member Function Documentation

◆ decode_all_registers()

template<typename AbiTraits >
static bool microfmt::gdb::register_array_decoder::decode_all_registers ( string_view  hex_payload,
const register_context_ref &  ctx 
)
inlinestaticnoexcept

Decodes the full register layout hex payload ('G' packet payload).

Iterates over the standard GDB layout in sequential order, extracting hex chunks, decoding them, and pushing them to the target context.

Template Parameters
AbiTraitsThe target ABI traits (e.g., aarch64_abi_traits).
Parameters
hex_payloadThe raw hex string received in the 'G' packet.
ctxThe typed-erased kernel/debugger thread context.
Returns
true if successfully decoded and written, false if the payload is malformed.

◆ decode_single_register()

static RELOCO_BEGIN_UNSAFE_CODE bool microfmt::gdb::register_array_decoder::decode_single_register ( string_view  hex_payload,
const register_context_ref &  ctx,
const register_mapping &  reg 
)
inlinestaticnoexcept

Decodes a single register hex payload ('P' packet value).

Parameters
hex_payloadThe hex value string to decode.
ctxThe typed-erased kernel/debugger thread context.
regThe register mapping describing size and DWARF index.
Returns
true if successfully parsed and written, false otherwise.

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